[Linux-disciples] 2 keymapping questions

Adam Rosi-Kessel adam at rosi-kessel.org
Tue Feb 1 09:26:04 EST 2005


Karl Sokol wrote:
> I have a USB numeric keypad for my laptop.  However, the numbers only
> work if I have the NumLK on.  This is annoying because then I cannot use
> UIOPJKL: or M on the laptop keyboard.  Is there a workaround for this so
> I can use both my keyboard and the USB keypad?
> Secondly, how can I change the value of keys.  Specifically, I want to
> use my [home] key as another [backspace].

I think for both questions you want to look at xmodmap.  You'll have to
see if the USB keypad generates any different keycodes than your
internal keyboard; if so you should be able to remap those keys directly
to numbers, without affecting the internal keyboard.  You would use the
same approach to remap [home] as [backspace].

The xev command will show you what codes are generated for every "event"
(key press, key release, mouse movement, etc.).  Run xev and see if you
get different results for the internal keyboard and external keypad, and
also to get the scan code for [home].

xmodmap is a little tricky to use at first, but this webpage should help
get you started:

Using XMODMAP to modify key and mouse actions
http://web.mit.edu/answers/xwindows/xwindows_xmodmap.html

and the relevant manpages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050201/9814fe4f/signature.pgp


More information about the Linux-disciples mailing list