Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to rebind C-n and C-p in all my applications to send Up and Down. My brain is just stuck with this shortcuts, and I am tired of always seeing new windows and printing dialogs popping up.

I was thinking about xmodmap, but it looks like it can redefine only one keysim not a combination.

Also tried xdotool key Up and xte 'key Up' to bind from keyboard shortcuts. It doesn't work properly and requires sleep 0.2 before the invocation which makes it infeasible.

Any ideas?

share|improve this question

1 Answer 1

Ok, I got it, autokey is the way to go.

sudo add-apt-repository ppa:cdekter/ppa
sudo apt-get update
sudo apt-get install autokey-gtk

Run the GUI and add new phrase with <up> as the script and shortcut Cntrl-p . Also you would like to exclude the emacs window, put ((?<!^emacs).)*$ as filter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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