Hi everyone,
I have added very preliminary support for keymapping to my test build of
x5250. It is far from ideal and you can only map a few keys, but I wanted
to get input from others before going much further.
Currently you can map a single action to several individual keys. That
means you can make 'enter' be the real enter key, the right control key,
the keypad enter key, or any other single key. Key combinations do not
work at this time. You can, however make 'enter' be the regular enter
key, the right control key, and any number of other keys. You just can't
use ctrl-<something>.
Key mappings are set as X resources just like every other component of
x5250. The following resource setting in ~/.Xdefaults will make the
'enter' key be both the right control key and the regular enter key:
X5250*Enterkey : 0xFFE4 0xFF0D
The following will make the field exit key be the enter key on the 10-key
keypad:
X5250*Fieldexitkey : 0xFF8D
The hex values come from /usr/include/X11/keysymdef.h. Simply look for
the keysym you want (it isn't too hard to figure out the right one) and
put its hex value in your ~/.Xdefaults.
The only keys that can be mapped at this point are 'enter' and 'field
exit'. Again, keep in mind that key combinations will not work.
What I would like to do is use the keysym symbol in .Xdefaults instead of
the hex value. I would also like to support key combinations by enclosing
them in parentheses. So, for example, to make ctrl-x as well as the
10-key enter key be field exit, the following could be put in .Xdefaults:
X5250*Fieldexitkey : (ControlMask XK_x) XK_KP_Enter
Anyone who would like to have a go at making that work take a look at the
set_keymap_values() function at the bottom of key.c. Note that the state
member of the keymap struct is the modifier key mask as set by X (i.e.
ControlMask, ShiftMask, etc.).
The source can be downloaded from:
http://www.chowhouse.com/~james/x5250/x5250.tar.gz
Please let me know what problems come up (I assure you they will).
Note to Jack J. Woehr:
This does not have the changes for Sun keyboards yet. But I think a full
implementation of this key mapping should solve your problems.
Regardless, could you send me a patch of the changes you made to support
Sun keyboards?
James Rich
It's not the software that's free; it's you.
- billyskank on Groklaw
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.