An 3.9 image for developers

David Shaffer cdshaffer at acm.org
Wed Sep 27 17:26:53 UTC 2006


Sorry for the late entry...I can't keep up with squeak-dev these days. 
Keymapping and KeyBinder try to achieve similar goals but Keymapping 
has some features which I believe are absent from KeyBinder:

- shortcuts can be assigned to any morph instance or class
- shortcuts can be assigned to categories and shared across multiple
morphs or morph classes
- shortcuts can be blocks, class methods sends or paragraph editor
shortcuts (you can use Keymapping to redefine the "text" keyboard
shortcuts).
- shortcuts can be triggered by arbitrary sequences of keystrokes (they
don't have to be simple alt-Key or control-Key combinations)
- shortcuts can be exported and imported into another image (w/
limitations on shortcuts which execute blocks).

My goal with Keymapping was to make it possible for developers to
specify default keyboard shortcuts for their menu operations and global
services and for users to be able to re-assign them.  I took this "all
the way" in Squeak 3.7 and migrated all of the built-in tools to have
re-assignable keyboard shortcuts.  I haven't done this for 3.8 or 3.9. 
I can't maintain that effort...although I could do it one or two more
times to a limited set of "base" tools.  If you load Keymapping into a
3.8 or 3.9 image you will likely be frustrated that pressing alt-B is
caught by the world "browse it" shortcut since the browsers haven't been
hacked to specify their shortcuts to Keymapping.  The net effect is
pressing alt-B in a browser window may raise a browser but with no class
selected (rather than the browser's behavior or raising a browser with
the current class selected).  The actual effect depends on your focus
settings and probably interactions with Romain's Services
framework...not sure about that one.


This is a bit off-topic but ultimately we need

1) a hook for key events that lets us do this without hacks...this has
already been mentioned in this thread
2) an abstract way for tools to specify possibly context-sensitive
keyboard actions as part of their description of context menus
3) an abstract way to specify application services and their
shortcuts...I believe that Romain has already solved this problem

I haven't looked at Services in a while but I don't think #2 has been
handled yet.  Suppose I wanted to have a "delete item" shortcut in a
list pane.  I don't want to provide that as a global service to other
applications.  Just a keyboard shortcut to trigger an action in the
current application when the cursor is over that pane.  Many
applications in Squeak do this and I don't think it always fits into the
"services" metaphor.

I'll bring this up in another thread...

David




More information about the Squeak-dev mailing list