1

I am using Ubuntu 12.04, my TAB key is not working and I want to use auto complete function. Is there any way I could assign other key for the same function in Ubuntu manually? I looked into the keyboard layout but I couldn't able to figure it out, Is it possible ?

2

For assign certain key to other, you need two tools, already available in ubuntu: xev and xmodmap

With xev you can output some information about the pressed key, or with

xmodmap -pke

you can read all the configured key, keycode and action.

With xmodmap you can change key map.

For example, this command assign tab action to backspace key (keycode 22):

xmodmap -e "keycode 22 = Tab"

to reassign to backspace is natural function, type:

xmodmap -e "keycode 22 = BackSpace"

These change will be lost after reboot. if you want that the changes are always loaded, you must create a file containing the keyboard mapping and load when the session start:

xmodmap -pke > ~/.Xmodmap (create file configuration .Xmodmap in your home directory)

then create file .xinitrc in your home directory (if not exists) and add this line (or append if file exists):

xmodmap .Xmodmap

this command loads the configuration at the start of each session.

You can create keyboard shortcuts by installing AutoKey from software center. After install, run autokey and create new phrase like this:

enter image description here

the key combination Alt+a will emulate the tab key.

  • Sorry If i am asking the wrong question, Do I have to place the "Key" in place of TAB to assign the same function ? – Abhinay Apr 20 '14 at 16:59
  • if I understand it, you want to assign the "TAB" key to another: if this is so, you must use the command xmodmap -e "keycode X = Tab" with X the keycode of the key you want it to work like the TAB key – girardengo Apr 20 '14 at 17:05
  • I want a combination of key like Alt+A , so can you tell me how to do it? – Abhinay Apr 20 '14 at 17:53
  • Just now I found out that pressing Esc key for a second gives me the same thing, why is that?, moreover it is also suggesting the possibilities. – Abhinay Apr 20 '14 at 18:26
  • i edited my answer. – girardengo Apr 21 '14 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.