Re: Ilisp key binding changes (Option #2) - Please Review
Edi Weitz <[email protected]>
| Newsgroups | gmane.lisp.ilisp.devel |
|---|---|
| Message-ID | <[email protected]> |
[Sorry for the late reply. I stored this email away when I was busy with other things and somehow managed to forget it.] Bob Rogers <[email protected]> writes: > From: Edi Weitz <[email protected]> > Date: 01 May 2003 20:19:26 +0200 > > But let me re-iterate what someone else has said on c.l.l: Some > of these non-letter characters are very hard to type for > localized keyboards, e.g. on my German keyboard {[]}\|@ can only > be reached by pressing the right ALT key ("AltGr") together with > another key. I guess this is about the same for most European > keyboard variants. > > Is this because the keyboard moves the non-letter ASCII characters > in order to make umlauted characters more prominent? Yes. It looks like this: <http://www.buessert.de/TRS-80/GermanTRS80/PC_GermanKeyboard_large.gif> Note how {[]}\ are on the 7890ß keys and can only be reached while pressing AltGr (right ALT key) simultaneously. > If so, then you might be able to get some relief by setting up > function-key-map "bindings" that turn modified umlauted keys into > modified special ASCII keys. Here is the first paragraph of the > function-key-map C-h v documentation: > > Keymap mapping ASCII function key sequences onto their preferred forms. > This allows Emacs to recognize function keys sent from ASCII > terminals at any point in a key sequence. > > Despite what it says about ASCII, the mechanism is quite general; > the default value (in emacs 20.7 anyway) has bindings for X11 > keysyms such as kp-insert and kp-5. This remapping happens at a low > enough level that terminal characters are remapped even in the > middle of bindings. For example, if you were to do > > (define-key function-key-map [kp-5] "\C-f") > > then typing "C-x kp-5" is equivalent to "C-x C-f". So I imagine you > might be able to re-encode whatever #\control-umlaut-u (for example) > produces, some ISO-8859-* code byte I assume, into #\control-^, or > something else more useful to you when interacting with emacs. [And > I'm using Lisp character syntax here because I don't know how to > type #\umlaut-u on my keyboard. ;-] Thanks, I didn't know that! It took me some minutes to figure out how to tell Emacs that I'm talking about "#\control-umlaut-o". The solution was to use what-cursor-position (C-x =) and then use the decimal code, i.e. for #\control-umlaut-o the decimal code is 150, so the command would be, say, (define-key function-key-map [150] "\C-]") > If you do try this, please let me know whether it works; I'm very > curious, and have no personal experience with European keyboards. Works fine. Thanks again for this hint. Cheers, Edi. ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com