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

My @ or 2 key is not working. I want to set it like, if user press Alt + a or something the 2 should be inserted to the active window. I have achieved this in windows using Auto It. In ubuntu i saw some solutions but couldn't do it. Any help would be appreciated. Or else i will be forced to move back to windows :-(

share|improve this question

First install xbindkeys and xte by running:

sudo apt-get install xbindkeys xautomation  
  1. Create the xbindkeys configuration file: xbindkeys --defaults > $HOME/.xbindkeysrc

  2. Next we need to edit the file. Run gedit .xbindkeysrc

  3. Add this to the bottom of the file:

    "xte 'key 2'"
    m:0x18 + c:38  
    Alt+Mod2 + a  
  4. Save the file.

  5. Open "Startup Applications" from the dash, and click "Add".

  6. Put /usr/bin/xbindkeys and click "Add".

  7. Restart the computer.

Your 2 key should now be bound to Alt + a.

share|improve this answer

Have you tried the program "Xmodmap"? Look at the documentation and if something is unclear ask again. Btw, a new keyboard shouldn't be to expensive...

share|improve this answer
Its my friends laptop, and she can't afford a orginal keyboard for atleast next few months. – esafwan Nov 30 '11 at 11:32

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.