I’ve just created a Kali Linux partition on my MacBook Pro. On Mac OS I used Karabiner Elements to remap the right alt key to left arrow because my real left arrow key is broken.

Now I want to do the same thing on Kali. To do so I installed xcape. I tried several commands like xcape -e "Alt_R=Left" and xcape -e "Alt_R=leftarrow" but none of them modified the keymapping. I also considered to accomplish the key remapping by modifying the xkb files, but I'm unsure which entries in the files I have to modify. I would appreciate any help on remapping the key.


With the following command I was able to map left arrow on right alt:

xmodmap -e 'keycode 108=Left'

Afterwards I mapped AltGr on right command:

xmodmap -e 'keycode 134=ISO_Level3_Shift'

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.