Score:0

How to remap tab key to Shift Left key?

cn flag

Unfortunately I found out that my tab key on keyboard does not work. Is there anyway I can map its functionalities (its autocomplete command function) to the left shift of the keyboard?

Score:0
it flag

Two solutions come to mind.

If you are trying to remap the keys in an X session (graphical user interface), you can use xmodmap from the x11-xserver-utils package to remap your keys via your .xinitrc file. (You can learn about the .xinitrc file by reading the xinit man page. In the .xinitrc you would write:

xmodmap -e "keycode 23 = Shift_L"
xmodmap -e "keycode 50 = Tab"

This would exchange the left shift with the tab key. (I have not tested this.)

The other solution applies if you are using a shell like Bash that uses readline. The Bash shell sources ~/.inputrc and you can change the complete variable. Information about this is in the Bash manual on readline init file syntax. However, mapping it to the left shift key (to the best of my knowledge) is not an option. Instead, you can map the file completion to a different escape sequence than tab. (To see what your keys are currently bound to, use the command bind -p, specifically bind -p | grep complete will show you whats bound to the complete variable; most likely it is bound to double esc and control-i.) You can map a different keyboard combination for complete.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.