Delete key and two-button mouse on Linux
Ned Konz
ned at bike-nomad.com
Mon Feb 19 00:43:11 UTC 2001
On Sunday 18 February 2001 16:11, Richard A. O'Keefe wrote:
> Do you mean *Squeak* should handle charcodes 8 and 127 equally or do
> you mean the *VM* should only ever generate charcode 8 for both keys?
>
> The former, of course.
I would submit that Squeak should not do such translation. That's what
XLookupString is for. We should not break someone's keyboard mappings.
There are standard X keysyms for these things:
Delete -- usually used for forward-delete
Backspace -- usually used for backward -delete
We should use these, because someone may change the X resources for Squeak
(or the X keyboard mapping).
On my keyboard:
* the key marked Del generates keysym 0xffff, Delete (XLookupString -> 127)
* the key marked Delete (the big one) generates keysym 0xff08, Backspace
(XLookupString -> 8)
* Control-H generates keysym 0x68('h'), with the control-key down.
(XLookupString -> 8)
Unfortunately, because of the conversion of 127 to 8, both the Del and Delete
keys do the same thing (backwards delete). I have to use control-Del (or
control-h !) to get a forward delete.
This bothers me. Why should Squeak take it on itself to re-map my keyboard?
In every other app I use, the Delete key does a backward delete, and the Del
key does a forward delete. Squeak breaks this by its mapping 127 to 8.
It seems that Squeak should not be trying to fix everyone's broken keyboard
mappings. It's no excuse that Linux is often broken out of the box. (I've
seen systems where Netscape, text consoles, xterms, and vi don't have the
same keyboard mappings).
> I strongly suggest that the UNIX VM should take a peek at the user's
> stty settings. If it's "stty erase '^H'" then whatever key(s) send BS
> should act as leftward delete (and DEL can be rightward delete). If
> it's "stty erase '^?'" then whatever key(s) send DEL should act as
> leftward delete (and BS can be rightward delete).
Stty is not appropriate for an X app. Squeak is using XLookupString already,
which is the right thing to do. Squeak should not fix mis-configured systems.
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|