Celeb Glow
updates | April 02, 2026

Remap TAB key to another key

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 ?

1 Answer

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.

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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