[ENH] Alternative EventSensor

Ned Konz ned at bike-nomad.com
Sat Jul 29 23:53:00 UTC 2000


Dan Ingalls wrote:

> >I find the VM's mapping of keys to be a weak spot of the current implementation.
> >There are a number of keys I just can't use, or that don't work the way I'd like
> >(for instance, I don't seem to have a forward delete key in Squeak).
> 
> Ctrl-delete gives you forward-delete (on the Mac, at least), as per (screen-menu / help... / command-key help).  Its undo happens to be broken, though, in case anyone wants to fix it [I'm guilty -- put it in a couple of years ago when I didn't understand how the ParagraphEditor handles undo (still don't ;-)].

Well, yes it does!

However, I already have a forward delete key that I'm used to using (separate
from my
backspace key), and it wants to do the same thing as my backspace key.

(I'm using the Linux version of Squeak).

There is some suspicious code in sqXWindow.c, inside recordKeystroke that does
this:

  if (keystate == 127)
    keystate= 8;

In other words, if the key is Del (127), make it a backspace (8).

I suspect this is here because there is no hard and fast standard under Unix
for what a Delete key emits (or the keypad DEL key either).
Because of this, different people have their keyboards emit different
characters.
Some people have their backspace key output 127, while others have it output 8.
And the Delete key generally outputs the other key value.

For that matter, the keypad DEL key often outputs yet another code. It's pretty
ugly.

But XWindows is ugly anyway (and Unix GUIs are nowhere near consistent...).

I personally feel that the best place to handle this is in the X resources for
the program (or perhaps with yet another command line switch?).

I'm going to remove those two little lines in my version, and suggest to the
Unix VM folks that we consider an alternative (for those of us who already 
have the CORRECT keyboard mapping [1]).

[1] That is: the big key above the Return key (which on my (but not every)
keyboard
is labeled "Delete")) emits an 8, and the Del key emits a 127.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list