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.

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

2 Answers 2

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

 
discard

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.