Hi,

I am trying to redefine shortcuts such as Cmd+s for an instance of 
PluggableTextMorph, but I cannot find a way.

Now that we have Kemappings in the image, I see that Cmd+s is defined in:
TextMorph>>buildTextEditorKeymapsOn: aBuilder
        <keymap>
        
        (aBuilder shortcut: #accept)
                category: #TextMorph
                default: $s ctrl win | $s ctrl unix | $s command mac
                do: [ :morph | morph acceptContents ].
                
        aBuilder attachShortcutCategory: #TextMorph to: TextMorph.


Nice, but this defines a behavior that is global to the TextMorph class.

The Keymappings extensions from Morph do allow some degree of morph specific 
shortcuts, but it seems that the only thing I can do is:
- create a category with my keymappings; the category must have a name
- registered it the dispatcher
- tell the morph to attach this category by passing the name of the category

I could not get a code that sets this up because I stumbled across too much 
symbol-based indirection. Can anyone help?

Cheers,
Doru


--
www.tudorgirba.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




Reply via email to