2

I would like to change my keyboard layout individually. For example switch the A key to B. Do I need a special software or is it possible directly in Ubuntu 12.04?

I found a ru file under /usr/share/X11/xkb/symbols which represents the keyboard layout. Unfortunately, I don't really understand the data structure.

If this is the only way to change the keyboard layout individually where can I find more information on the data structure and how to change it?

0

1 Answer 1

1

You need to install these applications:

sudo apt-get install xbindkeys xautomation xev

Use "xev" to find the button number that you need. You will see a little white windows appear, put your mouse in it and press the button. You should get output like this for each button:

KeyRelease event, serial 41, synthetic NO, window 0x4e00001,
root 0xc6, subw 0x4e00002, time 430656, (39,24), root:(765,76),
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False

KeyPress event, serial 41, synthetic NO, window 0x4e00001,
root 0xc6, subw 0x4e00002, time 432854, (39,24), root:(765,76),
state 0x10, keycode 56 (keysym 0x62, b), same_screen YES,
XLookupString gives 1 bytes: (62) "b"
XmbLookupString gives 1 bytes: (62) "b"
XFilterEvent returns: False

The important lines are the thirds.

Now create the xbindkeys config file using:

xbindkeys --defaults > $HOME/.xbindkeysrc  

Inside this file you can change behavior of all keys or combination of them.

gedit $HOME/.xbindkeysrc

Now you need to restart the pc.

Not the answer you're looking for? Browse other questions tagged .