You are not logged in.

#1 2010-04-09 13:32:35

coubeatczech
Member
From: Prague, CZ
Registered: 2009-02-04
Posts: 18

xkb custom keymap

hi, does anyone know how to map some no-character keys into xkb keymap?
I'm using vim and the <esc> key is just too far... :-)
So I want it to be mapped under H:

key <AC07> { [          h,  H, <what to insert here>,        ]       };

Thanks in advance...

Offline

#2 2010-04-10 02:14:09

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: xkb custom keymap

coubeatczech wrote:

hi, does anyone know how to map some no-character keys into xkb keymap?
I'm using vim and the <esc> key is just too far... :-)
So I want it to be mapped under H:

key <AC07> { [          h,  H, <what to insert here>,        ]       };

Thanks in advance...

That format is shorthand for

key <AC07> { type = "SOMETHING", [h, H, <something else>, ] };

and I don't recall offhand what the default SOMETHING is. You may need to change it to suit your desired use.

But to answer your direct question, the code for escape is "Escape". You can find that out in various ways, e.g., use xev, move your mouse into the new window and press escape and you'll see (amongst other text):

KeyPress event, serial 28, synthetic NO, window 0x1400001,
    root 0xe4, subw 0x0, time 203886151, (454,228), root:(456,254),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
    XmbLookupString gives 1 bytes: (1b) "
    XFilterEvent returns: False

Also, "xmodmap -pke" dumps the list of all currently assigned symbols.

Offline

#3 2010-04-10 13:14:58

coubeatczech
Member
From: Prague, CZ
Registered: 2009-02-04
Posts: 18

Re: xkb custom keymap

Thanks, this is very helpful for me,
I'm grateful.

Offline

#4 2010-04-11 15:35:46

coubeatczech
Member
From: Prague, CZ
Registered: 2009-02-04
Posts: 18

Re: xkb custom keymap

There's one problem, it looks like that this doesn't work in java applications. (tested in netbeans and jedit)
Do you know how to fix that?
Thanks smile

Offline

#5 2010-04-11 21:56:13

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: xkb custom keymap

No sorry. There are many layers each reinterpreting the keyboard (or what layers underneath them say about the keyboard). I've never bothered to figure out how to configure java apps.

Offline

Board footer

Powered by FluxBB