I tried to map the arrow key to a keyboard shortcut Ctrl+Alt+ respectively hjkl key with xdotool so that I don't need to leave the home row even if I am editing something outside vim. Almost no application use the Ctrl and Alt keys together, so I guess it won't override any application shortcuts. To do that I associated the shortcuts with the command /bin/bash -c "sleep .001 && xdotool key --clearmodifier --repeat 1 --delay 0.001 Up". and /bin/bash -c "sleep .001 && xdotool key --clearmodifier --repeat 1 --delay 0.001 Down" and respectively Left,Right. I use Gnome3 ubuntu18.04. I couldn't figure out what is wrong, why doesn't it work. Now if there is any solution for this using xkb then it would be great, I couldn't find a way using xkb, so I took a easy way, which didn't work either.

Your Answer

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

Browse other questions tagged or ask your own question.