Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.