You are not logged in.

#1 2010-02-02 09:33:50

falbani
Member
From: Buenos Aires - Argentina
Registered: 2010-02-02
Posts: 16

Remaping some keys with loadkeys and xmodmap

Me again.

I have a EEEPC 1005HA and I really don't like to press the Fn key to reach the HOME and END keys and the extreme position of DELETE. I also don't like SHIFT+7 for such a common symbol as "/". For all these reasons, I devised this scheme for the virtual consoles:

loadkeys -q /usr/local/share/kdb/keymaps/personal.map

in my /etc/rc.local script, with

keycode 97 = Remove
keycode 119 = Find
keycode 99 = Select
keycode 127 = F70
string F70 = "/"

inside personal.map.

All this made this replacements:

Pause --> HOME
PrintScreen --> END
Right Ctrl --> DELETE
MENU --> "/"

All this works fine... but I get strange results when I use xmodmap for doing the same inside Xorg. This is my ".Xmodmap" file:

keycode 127 = Find
keycode 107 = Remove
keycode 105 = Select

Strange results:
1) HOME (ex-Pause) and END (ex-PrintScren) work fine inside urxvt, but they do not work in firefox nor geany.
2) DELETE (ex-right control) works in all of them but with no key repetition (I have to release the key in order to use it again).
3) (Not strange) I don't know how to make the replacement for the menu key tongue

Any idea?

Thanks in advance.

EDIT: Improved the title.

Last edited by falbani (2010-02-03 02:44:13)

Offline

#2 2010-02-27 03:46:05

diegonc
Member
Registered: 2008-12-13
Posts: 42

Re: Remaping some keys with loadkeys and xmodmap

falbani wrote:

3) (Not strange) I don't know how to make the replacement for the menu key tongue

Open a console, launch xev, set focus to the newly created window, press the menu key and finally inspect the console for the keycode.

And here is how what you should be looking for looks like:

KeyPress event, serial 27, synthetic NO, window 0x1600001,
    root 0x122, subw 0x0, time 5908324, (168,173), root:(169,194),
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x1600001,
    root 0x122, subw 0x0, time 5911343, (168,173), root:(169,194),
    state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Offline

Board footer

Powered by FluxBB