shift-cmd keys [BUG][FIX]

William O. Dargel wDargel at
Sat Feb 20 05:27:59 UTC 1999

Tim Rowledge wrote:

> I recently noticed that the sh-cmd / ctl key actions had stopped working for me. It seems
> bill dargel changed the table init to use the shifted ascii values instead of the plain
> values. This patch adds the plain ones back into the table and so everyone should now be
> happy.

The patch looks good over here. I'm happy ;-). But seriously, I do apologize for breaking it
for you.

As I recall, the Shift-Cmd (Shift-Alt) keys just weren't working in Windows (I know, I
know... I should be using a real OS;-) Since Ctrl-<key> was working, I could have easily
gotten by without having Shift-Alt-<key> do the same thing. But at the time I was thinking
about expanding the key bindings so that Ctrl-<key>, Alt-<key>, Shift-Ctrl-<key>,
Shift-Alt-<key>, Ctrl-Alt-<key> and Shift-Ctrl-Alt-<key> could at least potentially all be
utilized. I guess I got discouraged by the relative hard coding of modifier keys into the
methods and, without experience with other platforms or a good enough understanding of the
big picture, couldn't figure out how to change it.

I did hack ParagraphEditor>>dispatchOnCharacter:with: so that I could use the Ctrl-C command.
On Windows anyway Ctrl-C comes through as an ascii 3, which is apparently the Enter key on
the Mac. I ended up just commenting out the "char = Character enter ifTrue: [^self
dispatchOnEnterWith: typeAheadStream]" so that it would work.

This all seems to point out the need for a more general overhaul of how keys get mapped to
commands. We should be able to handle all the platforms _and_ user preferences for key
mappings by at most plugging in a new (or modifying the current) table of key-bindings. And
it would of course want to interface cleanly with getting events from the OS rather than the
current polling method, and be dynamically reconfigurable ala menu accelerator keys as your
context changes, and...  But perhaps I digress.

Bill Dargel            wdargel at
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105  USA

More information about the Squeak-dev mailing list