dgreen@squid.cs.ucla.edu (Dan R. Greening) (11/06/88)
I tried to find some utility that would allow me to rebind keysyms into strings, so I could use emacs again. Nothing exists that I can find, and the documentation on the Keysym/Keycode stuff is obscure. Nonetheless, I think I figured it out, and I've added some code to xmodmap to perform XRebindKeysym. Here's what I really don't understand: Why is the modifierlist input to XRebindKeysym a list of KeySyms? What happens if there is no KeySym associated with a modifier? Why not use the shifted modifier numbers instead? This whole problem might go away if there was some way to insert arbitrary strings using Text widget. Shouldn't the "string()" action in xterm be a part of the Text widget as well? Or perhaps a part of the Core widget class? Or am I missing something, and X11R3 has some easy way to rebind keys to strings? Dan Greening Internet dgreen@cs.ucla.edu USPS 3436 Boelter Hall / UCLA / Los Angeles, CA 90024-1596 Voice 213-825-2266
jim@EXPO.LCS.MIT.EDU (Jim Fulton) (11/07/88)
XRebindKeysym does not do global rebinding of strings to keysyms. It is only used to change the local bindings (i.e. the tables used by XLookupString). The xmodmap program is used to change or display the following: o the mapping from keycodes (which are server-dependent, arbitrary numbers correspond to physical keys; sort of like make/break codes) to keysyms (symbolic constants representing the function corresponding to the etching that appears on the key). o the list of keycodes that the server should keep track of and report as modifier bits (e.g. "when the key code 85 is down, set the shift bit in event modifier masks"). o the mapping from physical pointer buttons to logical button constants (e.g. Button1, Button2, etc.) It does not deal with translating keysyms to strings at all. If your application wants actual strings (i.e. if it is manipulating text), you can use the routines XmuLookupLatin1 XmuLookupLatin2 XmuLookupLatin3 XmuLookupLatin4 XmuLookupKana XmuLookupArabic XmuLookupCyrillic XmuLookupGreek XmuLookupAPL XmuLookupHebrew XLookupString The R3 xterm uses the Translation Manager in the X Toolkit so that it can do arbitrary rebinding of events. The hope is that someone [else] will fix emacs to do the same thing soon. Ideally, it would be done by identifying the code in xterm that would be useful in emacs and moving it to Xmu. Jim