Slight modification of keypad behavior needed

Paul M Foster paulf at quillandmouse.com
Sat Jan 27 01:13:47 PST 2007


Running X 7.1.0 under Debian unstable (Sid). Standard 104 key keyboard, 
U.S. configuration.

The keypad plus key with numlock produces XF86_Next_VMode, and the 
keypad minus key with numlock produces XF86_Prev_VMode. As I normally 
run with my numlock set, and typically do numeric data entry, this 
doesn't work well. *Desired* behavior would be for these key to produce 
these events with numlock *off*, and produce + and - respectively with 
numlock *on*. (Similar behavior would be desired with the * and / keys.)

I've created a script which runs xmodmap commands to change reverse the 
level1 and level2 mappings, as follows:

xmodmap -e "keycode 82 = XF86_Prev_VMode KP_Subtract"
xmodmap -e "keycode 86 = XF86_Next_VMode KP_Add"

However, while this works temporarily, it must be run manually after 
starting X, and after an indeterminate period of time, the key mappings 
will revert to their original state without warning.

A more permanent solution would involve tinkering with the XKB 
configuration files, but I'm frankly at a loss on how to do this. I've 
reviewed the documentation in the xkb direction, but it does not explain 
the concepts thoroughly enough, and refers to a PDF on the internet that 
I cannot find. The number of files which reference other files, which 
deal with rules, symbols, geometry and compatibility, etc. is 
staggering. Rather than editing the xkb config files (which might be 
overwritten at the next upgrade or reinstall of X) I'd prefer to add new 
files which would be called properly within the framework of xkb.

Can anyone assist in this?

Paul

-- 
Paul M. Foster



More information about the xorg mailing list