19.04.2024, 22:47 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]
* Enhancement-scripts - List of scripts (not being updated!)
* Keeping the system clock synchronized with the atomic clock


Script to enable laptop numeric keypad

Remap keys the easy way!

This wiki was inspired by me needing to use a numeric keypad with my laptop. The problem was that to use it, I had to turn on Num-Lock which also enabled the overlaid numeric keypad. This was quite counter productive, but I discovered an easy way to fix this. Basically, we just remap the alternate keys on the external keypad to what we want them to be.

First, we need a nifty little gui called xkeycaps http://www.jwz.org/xkeycaps/

go to root
# apt-get install xkeycaps

switch back to user
$ xkeycaps

now, your keyboard should appear (mine appeared as generic 105 key)
go ahead and continue. This should focus the onscreen keyboard... check it out, press some keys, they will turn yellow, and all of the codes and mappings will show up on the top. Cool, hey?

Now, right click on the on screen numeric keypad number 1, and select Edit KeySyms? of key.

Left click on KeySym1?: (it will turn black) and then on Keyboard under Character set. Now, the scroll bars are a bit unconventional, so right and left click on the scroll bar for KeySym? until you see KP_1... left click on KP_1. You should see that on the left it has now changed to KP_1. perfect. (it's ok that KeySym2? is the same... no worries).

Continue this process for all of the buttons on the numeric keypad. I remapped the NumLock to be backspace as I no longer have any need for the overlaid feature...

Now, you need to write changes when everything looks right. Just add the keys that have changed.

You get a screen with some good advice. What the write process does is create a file in your home directory called .xmodmap-<hostname> (the . just means it is a hidden file).
add this line :

xmodmap ~/.xmodmap-`uname -n`

to your login script (as USER) like this

kwrite ~/.kde/Autostart/remapkeys

# modified key mapping for numeric keypad
xmodmap ~/.xmodmap-`uname -n`

save and exit

again, as USER

cd .kde/Autostart
chmod +x remapkeys

reboot, and it should be good to go!

-- Jazon
XML Revisions of $tag
Seiten-History :: Letzter Editor : bluewater :: Eigentümer : RoEn ::
Powered by pnWikka 1.0
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.