Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!bloom-beacon!LIGHTNING.MCRCIM.MCGILL.EDU!mouse From: mouse@LIGHTNING.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: need help to add accented letters to US keyboard Message-ID: <9010120141.AA01273@lightning.McRCIM.McGill.EDU> Date: 12 Oct 90 01:41:35 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 55 > I am using X11r4 on a Sun 3/80 running SunOS 4.0.3, with a type 4 US > keyboard. I would like to use the Mod1 key (Meta Left key according > to Sun terminology) combined with the Shift key to generate accented > letters with the [ ] ; ' ` , . and / keys. > I tried to add the following lines to my .keycode.map file: > keysym bracketleft=bracketleft braceleft egrave udiaeresis [...] > but couldn't get xmodmap to accept that. I also tried: > keycode 48=equal plus ediaeresis idiaeresis > but couldn't get the keyboard to generate an accented letter, even > though an "xmodmap -kp" would show the modified entries, i.e. > 48 0x003d (equal) 0x002b (plus) 0x00eb (ediaeresis) 0x00ef (idiaeresis) > I was however able to generate accented letters by redefining the > "Shift-ed" definition of the function keys (F1 to F12) with the > following lines in my keycode.map file: > keycode 12=F1 eacute [...] The problem is that keysyms after the first two in a key binding do not have standard interpretations, so you're at the mercy of the client program. I seem to recall that there is some sort of de-facto pseudo-standard that the third keysym is to be used when Mod1 is active, but I don't think the default XLookupString() does this; clients must handle it themselves. Keyboard handling is IMO one of the weakest points of X. I have been mulling over some of the possibilities, as have doubtless many others, but I have nothing concrete to suggest yet. > Could any kind soul point me to the adequate documentation or > directly tell me how to achieve my goal. Toolkit clients generally accept Translation resources to allow you to bind actions to keys; these actions can, I believe, include things like inserting a Latin-1 accented character into a Text widget and such things. However, the mechanism is seriously flawed. In particular, each client must have its Translation resources set up separately; there is no way to (say) set F9 to generate the string "foo" for all clients that simply call XLookupString, or to specify that Mod2-Shift-semicolon is to generate a capital thorn in all clients. I suspect that the situation is bad enough that the first semi-solution proposed will rapidly become a de-facto standard, which is part of the reason I'm holding off proposing any of the various ideas I've had - I don't feel they're good enough. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu