help adding keyboard shortcuts

Doug Way dway at
Tue Sep 26 00:32:12 UTC 2000

Jeff Sparkes wrote:
> I'm a newbie, and want to add some keyboard shortcuts to cut
> down on the amount of mousing since I have RSI problems.
> I haven't been able to figure out how to do this from browsing,
> so I need some tips.  I'd like to add global ones like Ctrl-TAB

Someone implemented an enhancement which does something like this awhile
ago... I was curious and dug around a bit and found this one by Joshua
Gargus in the Fixes Archive:

(It probably needs a fix or two to work with Squeak 2.8.)

Also, I thought someone else implemented a more Windows-like version of
this using Ctrl-Tab awhile ago, but I couldn't find anything in the
archives.  Although you could probably use Joshua's code as a base to
work from.

> and local ones to Workspace and code panes.

This is somewhat more difficult (using key commands to shift focus
between the subpanes of a SystemWindow, that is).  I don't think anyone
has implemented this yet in Squeak, but it should be doable.  It would
be a great thing to have.

In order to figure this out, it looks like you'd want to start looking
at the methods mouseEnter: and mouseLeave: in
PluggableTextMorph/PluggableListMorph/ScrollPane.  You'll see in
PluggableTextMorph>>mouseEnter: that it sets the newKeyboardFocus: when
the mouse enters the current pane.  You could try adding "self halt"s in
there and do some debugging to see what's going on.  Then, try adding
your own modifier key commands to set the newKeyboardFocus: yourself. 
(I'm not sure what key combo would be best for this... I think
Ctrl-arrow would be ideal because you could move up and down as well as
left and right between panes.  Hmm, unfortunately Ctrl-arrow is taken...
perhaps Cmd/Alt-arrow.)

Anyway, this isn't a simple task for a newbie, but it would be a great
way to learn something about Morphic & Squeak if one worked on it for a

- Doug Way
  dway at
  RiskMetrics Group - Software Research, Ann Arbor, MI

More information about the Squeak-dev mailing list