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 don't know why it happens, but if I press the Left Ctrl the output is backtick (`). When I press the right Ctrl the output is like Ctrl+Z. My keyboard layout is USA.

share|improve this question
    
Could you elaborate you question. Does it always happen? What language is your keyboard? What language is your desktop set to? Also, prefixing your question with "HELP" is generally bad practice. It won't get you help faster. Writing a good question will though. –  N.N. Jun 15 '11 at 11:22
    
sorry for my mistake,,my english bad, my keyboard layout language is USA...it always happen... i change the keyboard with other keyboard, the result is same. –  rizanoar Jun 15 '11 at 15:03

1 Answer 1

Well, I don't know what the problem is, but you might be able to force your way out of it using Xmodmap.

It requires the following steps:

1) Find out what keycode is written by your left Ctrl key: start a terminal and run 'xev'. Then place your mouse over the Event Tester and press the Ctrl key. You will get a read-out like

KeyRelease event, serial 36, synthetic NO, window 0x4e00001,
root 0xb2, subw 0x0, time 88800774, (-352,380), root:(371,431),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False

This was for my Left Alt key. Locate the keycode -- in this case '64'.

2) Enforce a different behavior: go to your home directory and edit '.bashrc' -- if you use Nautilus and not a terminal to find it, then it's hidden: Press Ctrl+H to show hidden files.

Add a line to re-code the key behavior:

     xmodmap -e "keycode 64 = Control_L"

Of course, the 64 should be replaced for the keycode you obtained in step 1. Now save the file and close it.

3) Activate the behavior: Run a terminal. Every time the machine has been booted, this behavior has to be activated -- this is done by opening a terminal. You can close it right away again. Otherwise, you have to make the change in a different file, [see here].1

I hope this solves your problem!

share|improve this answer

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.