Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 have redefined my right ctrl key to delete, using

xmodmap -e "keycode 105 = Delete"

and this works very nicely, except that whenever I hold the key, it deletes only once. Of course, I can highlight a sentence and delete it all with one press, but it would be very nice to be able to hold the key down, and have it continuously delete (as the the normal del key does).

Can this be done?

share|improve this question
up vote 2 down vote accepted

Use xset to enable the auto-repeat feature.

Run xset without parameters to see the usage:

To turn auto-repeat off or on:
-r [keycode]        r off
 r [keycode]        r on
 r rate [delay [rate]]
share|improve this answer
Thank you! This does change the behavior, but not in the intended way. Most notably, the repeat rate is very high, and is not affected by xset r 105 r rate 250 2 -- when held, Left Ctrl deletes a fullscreen line of text in gedit in an instance. Secondly, held in terminal, it does not continue to delete, it deletes once and then prints 5~ multiple times. – Rasmus Sep 13 '11 at 7:57

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.