jh@efd.lth.se (Joergen Haegg) (02/15/91)
Don't know if this is new, but here goes: I want 8-bits keyboard, but I don't want to remember what character generates with the eigth bit set. Can I map the Meta key and '[' to 0xc4, but still keep '[' and '{' on the same key (without meta)? Looking at xmodmap tells me that I can only have two keysyms to a key. Does this mean that I cannot have more than two characters per key? Or is it possible to map Meta+key or Meta+Shift+key to other values? (Or should I reread the manual? :-) Please answer by E-mail. -- Joergen Haegg jh@efd.lth.se postmaster@efd.lth.se System manager @ efd 046-107492 Lund Institute of Technology E-huset, DDG, Ole R|mers v. 3 221 00 LUND, Sweden
mouse@lightning.mcrcim.mcgill.EDU (02/16/91)
> I want 8-bits keyboard, but I don't want to remember what character > generates with the eigth bit set. You don't say what flavor of X you're using. My reply is written based on R4 information; I don't know what, if anything, R3 has to address this issue. > Can I map the Meta key and '[' to 0xc4, but still keep '[' and '{' on > the same key (without meta)? Probably not. Meta is not the intended way to deal with this. You should probably use either the compose mechanisms or simply xmodmap Adiaeresis to somewhere on your keyboard. > Looking at xmodmap tells me that I can only have two keysyms to a > key. Then something's broken. You should have an effectively unlimited number of keysyms per key, though only the first four have standardized interpretations. What it sounds as though you're trying to do is what the Mode_switch keysym is for. The way this works is that you use xmodmap to set some key on your keyboard to the Mode_switch keysym and tie one of the mod1 through mod5 modifier bits to the Mode_switch keysym. Then, when this key is down, the third and fourth columns of the xmodmap table will be used instead of the first and second. (If a given key doesn't have anything in the third and fourth columns, the first two columns are still used for that key.) This is derived from the precise description early in section 5 ("Keyboards") of the protocol document. If you don't have the protocol document, I can mail you the relevant snippet.... > (Or should I reread the manual? :-) Only if you have the proper manual, that being the protocol document. (The Xlib document mentions this under XLookupString, but only to refer you to the protocol document.) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu
tml@tik.vtt.fi (Tor Lillqvist) (02/20/91)
In article <1991Feb15.142613.9429@lth.se> jh@efd.lth.se (Joergen Haegg) writes:
I want 8-bits keyboard, but I don't want to remember what character
generates with the eigth bit set.
Can I map the Meta key and '[' to 0xc4, but still keep
'[' and '{' on the same key (without meta)?
You shouldn't use Meta, but Mode_switch. Here is how I do it:
! Mapping for HP keyboards at tik.vtt.fi
! We want the BackSpace key to generate Delete
keycode 101 = Delete BackSpace
! Map keys with non-USASCII keysyms to generate the corresponding
! USASCII keysyms according to the traditional 7-bit mapping.
! Use the Execute key as a mode switch to get original keysyms ("scandinavian
! letters")
keycode 100 = quoteleft at eacute Eacute
keycode 107 = braceright bracketright aring Aring
keycode 108 = asciitilde asciicircum udiaeresis Udiaeresis
keycode 115 = bar backslash odiaeresis Odiaeresis
keycode 116 = braceleft bracketleft adiaeresis Adiaeresis
! We don't want Caps_lock
clear Lock
! Use Execute key as Mode_switch
keycode 87 = Mode_switch
! and add a modifier for it
add Mod2 = Mode_switch
Now, for example, the key labelled with an adiaeresis normally
generates braceleft and bracketright, and if you keep Execute down,
adiaeresis and Adiaeresis.
Another matter is that some clients don't seem to understand this.
--
Tor Lillqvist,
working, but not speaking, for the Technical Research Centre of Finland