[ANN] New keymapping on SqueakMap

David Shaffer cdshaffer at acm.org
Sun Dec 19 19:20:40 UTC 2004


stéphane ducasse wrote:

>
> can we change the keybindings of texteditors/paragraphEditor at the 
> instance level (ie have different binding in workspace and classbrowser) ?


Keymap entries are organized into categories.  By default most morphs 
belong to 2 keymap categories: #Default and the name of the morph's 
class.  So, the short answer is that the only way to do this generally 
(so that all browsers would have one keymap and all browsers would have 
a different one) is to modify those classes to add a new category to 
their text editors.  This is simple to do (I provide examples in my 
help) but requires a change to that class.  Of course the end user could 
always add a category to a single instance of a morph and customize that 
category.  This is less useful than having the tool support a custom 
keymap for its text editor though.

> why?


I'm not sure what you'd use your specific example for.  But, for 
example, I use this feature to add different keymaps to different 
PluggableListMorph's.  The browser's various PLM's each have their own 
categories as does the ProcessBrowser's, for eaxmple.  So, place the 
mouse of the Class pane and press <c-k>.  Now do the same for the 
message list pane.  Notice they have different keymaps even though they 
are both PluggableListMorphs.  You'll also notice that they _share_ some 
of their keymaps.  This was the way the original CodeHolder was designed 
and I remained faithful to it to the extent I could.

>
> David this is cool.
>
>
Thanks!  I'd like to mention that I didn't ignore the thread on platform 
specific behavior of keyboard shortcuts and I've started to work on 
tools to make it easy to get the right behavior on startup of 
Keymapping.  There is a non-GUI tool to convert keymap entries so I can, 
say, convert meta- key combinations to ctrl- key combinations etc.  
Still, I only use UNIX so there are probably MAC and Windows issues that 
I've missed.  I'm looking forward to some more feedback from community.

David




More information about the Squeak-dev mailing list