*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: [1] 2
Print
Author Topic: Sticky CTRL key - workaround nearly working!  (Read 28117 times)

Sticky CTRL key - workaround nearly working!

markhadman
Senior Contributor
**
Posts: 112


February 01, 2008, 05:14:23 PM

OK, so being a European owner of a second-hand XO I don't figure there's much point in trying to get an RMA, so I've spent half of today trying to implement the workaround that's scattered over various forum posts and bug reports. This is all from memory so it'll need correcting by someone who knows command-line well.

Entering the following 5 lines in the Terminal Activity successfully disabled my Control key and enabled the left Hand key to take over Control key function:

xmodmap -e "remove Control = Control_L"
xmodmap -e "remove mod4 = Super_L"
xmodmap -e "keycode 37 ="
xmodmap -e "keycode 133 = Control_L"
xmodmap -e "add Control = Control_L"

note - if you want to get an idea what's going on here, do

xmodmap

on its own.

Next step, I did

cp /home/olpc/.xsession.example /home/olpc/.xsession
nano /home/olpc/.xsession

...and added those 5 lines in the end of my .xsession file.

I then did a full reboot of the XO. The control key was disabled, but the hand key wasn't enabled, even though the output of xmodmap looked correct. On a hunch I reentered the last 2 lines by hand and it worked.

So, I need someone smart to figure out why those last 2 lines need re-entering. Is there somewhere better than .xsession to put the commands? Are they being executed too soon, or in too rapid succession? Can you duplicate this behaviour?

We're so close to having a how-to... If we get it sorted I'll redo it for the Alt key as well

(Incidentally, I now have another keyboard problem, Ikeep getting 2 keystrokes in reverse order. I'm giong to (see?) uninstall xbindkeys to see if it helps, otherwise can anynoe suggest anything else?)
« Last Edit: February 02, 2008, 11:56:20 AM by markhadman » Logged

#1 Re: Sticky CTRL key - workaround nearly working!

markhadman
Senior Contributor
**
Posts: 112


February 01, 2008, 05:39:02 PM

correction! redoing by hand the first and last lines makes it work:
xmodmap -e "remove Control = Control_L"
xmodmap -e "add Control = Control_L"

but  whhhhyyyyyyyyy?


Oh, and doing yum remove xbindkeys DID solve the other problem. It's not included in 653, i just installed it today as part of my fumbling investigations. To sum up... xbindkeys isn't (anecdotally) good for the XO-653!
Logged

#2 Re: Sticky CTRL key - workaround nearly working!

Brian Callahan
Commenter

Posts: 8


February 02, 2008, 11:35:53 AM

<edit: Mark fixed the typo>

Thanks for the workaround! I am past the warranty return period, so I will use your idea until I discover a way to get the hardware fixed.
« Last Edit: February 02, 2008, 12:36:19 PM by Brian Callahan » Logged

#3 Re: Sticky CTRL key - workaround nearly working!

markhadman
Senior Contributor
**
Posts: 112


February 02, 2008, 11:59:33 AM

thanks for  pointing that out, I've fixed my original post. The error was caused by retyping from memory because cutting and pasting is such a pain on the XO as it stands. My .x-session was done 'correctly' but still doesn't work as expected, ie hand key still has to be done by hand. Let me know how it works for you.
Logged

#4 Re: Sticky CTRL key - workaround nearly working!

Brian Callahan
Commenter

Posts: 8


February 02, 2008, 12:32:08 PM

<edit: woops, I spoke too soon>
« Last Edit: February 02, 2008, 12:49:10 PM by Brian Callahan » Logged

#5 Re: Sticky CTRL key - workaround nearly working!

Brian Callahan
Commenter

Posts: 8


February 02, 2008, 01:39:57 PM

I didn't put the commands in .xsession exactly as you did. Instead I have:

xmodmap -e "remove Control = Control_L"
xmodmap -e "keycode 37 ="
xmodmap -e "keycode 133 = Control_L"
xmodmap -e "add Control = Control_L"

I get a similar behavior problem as you but not quite the same. Upon reboot, the defective Control key is defeated, as intended. But, the Hand key is not mapped. By executing the last command manually (or via a script), the workaround works. I do not need to enter the first command manually.
Logged

#6 Re: Sticky CTRL key - workaround nearly working!

Brian Callahan
Commenter

Posts: 8


February 02, 2008, 02:03:51 PM

The workaround doesn't seem to work in the two "Console" windows (accessible via ctrl-alt-F1 and ctrl-alt-F2). Upon the xmodmap command it gives an error:

xmodmap:  unable to open display ''
Logged

#7 Re: Sticky CTRL key - workaround nearly working!

markhadman
Senior Contributor
**
Posts: 112


February 02, 2008, 03:42:21 PM

OK, so the mod4 line is superfluous, I've ditched it. And yes, I only need to retype that one last command to get the hand working.

I'd guess the latter behaviour is because the ctrl-alt-f1/f2 consoles aren't part of the XWindows system that xmodmap belongs to.


Logged

#8 Re: Sticky CTRL key - workaround nearly working!

markhadman
Senior Contributor
**
Posts: 112


February 02, 2008, 03:56:01 PM

Man pages for xmodmap:
http://www.linuxmanpages.com/man1/xmodmap.1x.php

There is a suggestion that running keycode commands can screw things up temporarily, and that we need to run the whole operation concurrently as one command (see known bugs at the end of the man page). So we need to work out the right syntax and how to run it. I can feel the end is in sight with this one.
Logged

#9 Re: Sticky CTRL key - workaround nearly working!

markhadman
Senior Contributor
**
Posts: 112


February 02, 2008, 06:22:49 PM

(modified to reduce ranting)

'Sleep' command doesn't help
'At' command might do the trick, but what a messy solution, and it's complaining about lack of 'atd'. Do I need to yum install atd as well as yum install at?

We need to run the xmodmap -e "add control = Control_L" command at some time after ~/.xsession is executed.

Somebody help us please. Now my keyboadr is reversing characters again, xbindkeys wasn't the culprit. i want to throw this XO in the bin.

AAAAAAAAARRGGGGGGGHHHHHH!!!!!!!!
« Last Edit: February 03, 2008, 04:57:37 AM by markhadman » Logged

#10 Re: Sticky CTRL key - workaround nearly working!

Gabey8
Global Moderator
OLPC News Forum Expert
****
Posts: 596



WWW
February 02, 2008, 08:57:42 PM

FWIW, my keyboard has been transposing characters from the beginning.The problem seems to be that I tend to type a bit too fast for the machine (85 wpm on a standard keyboard). When I pace myself and type a bit more slowly on the XO, the problem happens a lot less often. I don't have to type at a snail's pace -- I just have to take my time a little more. It helps me reduce the number of typoes overall, too. Or maybe I'm just more accustomed to the small keyboard after six weeks of using it. Wink
Logged

Mesh name: Donna. XO icon: purple outline and orange fill color. From Philadelphia, PA, USA. If you see me in the Neighborhood, say hi. Smiley Currently using jabber server xo1share.org .

#11 Re: Sticky CTRL key - workaround nearly working!

markhadman
Senior Contributor
**
Posts: 112


February 03, 2008, 04:54:15 AM

for me, it's intermittent. Now I can type 'on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on on' and it didn't once mix up the letters, but later on today it might do it 100% of the time... Not that I'm going to be spending much time with the beast today, I might just get as frustrated as I was last night.
Logged

#12 Re: Sticky CTRL key - workaround nearly working!

coyotedad
Commenter

Posts: 18


February 03, 2008, 07:58:33 AM

I too am having a stickly Ctrl key issue with my son's XO.  This has caused a negative reacttion from him and now his interest is failing due to this hardware issue.  Although I am unable to come up with a solution this this problem, I am confident that someone on this forum will be able to crack this problem.  I am just thinking of all the children throughout the world who have recieved an XO and now might be having problems.  If my son's reaction is the typical response, it would be sad for this whole project and its goal to be destroyed by faulty hardware.
Logged

#13 Re: Sticky CTRL key - workaround nearly working!

Gabey8
Global Moderator
OLPC News Forum Expert
****
Posts: 596



WWW
February 03, 2008, 07:46:31 PM

Here are a few non-software things I've tried that help with sticky keys:

Do not lift the laptop by the keyboard half, particularly down around the corners and the touchpad area. Also do not use it on a non-flat surface such as on a lap without the support of a lap desk. It seems that anything that flexes or stresses the keyboard area makes my keys start to act up. (More often than not the ALT key, but sometimes, the CTRL key, start sticking if I do these things.)

If a key acts up, massage it. If it persists on acting up, massage it from the top and bottom together (ie, index finger on the key itself while the thumb is under the bottom of the XO, beneath the offending key.)

Another thing that helps is pressing on the white frame in the vicinity of the stuck key. This has also helped me get an unresponsive space bar to revive and work  properly.

I also find that at times when it acts up, using it and using it and using it on a flat surface seems to help get it back into a more cooperative mood.

One other thing: it helps to learn what the keyboard shortcuts for the CTRL and ALT keys are. For example, CTRL-O opens the Journal. ALT-R rotates the screen. These things will help you recognize right away if a key is sticking, and which key it is. For example, if you're typing text and the screen abruptly rotates for no apparent reason, if you were trying to type an R at the time then your ALT key might be sticking. If the keyboard suddenly seems totally unresponsive, something might be sticking and by hitting things like O and R, you can watch the reaction of the XO and see if the problem is being caused by a stuck key.

Ideally, a real fix will come out for the keyboard issues. Until then, I've found the above steps useful for identifying, avoiding, and clearing up the problem. I hope this helps.
« Last Edit: February 03, 2008, 07:48:04 PM by Gabey8 » Logged

Mesh name: Donna. XO icon: purple outline and orange fill color. From Philadelphia, PA, USA. If you see me in the Neighborhood, say hi. Smiley Currently using jabber server xo1share.org .

#14 Re: Sticky CTRL key - workaround nearly working!

KayTi
Senior Contributor
**
Posts: 128


February 03, 2008, 08:13:10 PM

Thanks for this thread, folks - it's really great. I wish I had something useful to add. I doubt it, but I'll try. Cheesy

I'm not a programmer, so I'm going to have to wait and see what you guys come up with as far as line changes via the terminal.

The keyboard issue is affecting only US English (maybe only G1G1?) laptops right now. Last I heard the first few broken units were awaiting customs clearance destined for the keyboard OEM somewhere in Asia.

Gabey - have you noticed any connection with the brightness setting? Someone mentioned it on another thread here and I haven't tried that yet. Wondering if it's worthy of adding to your awesome "try this" list.

And Markhad - I'm relieved to see someone else reporting what I thought was just bad typing on my part. I'll have to watch more closely which of our two units does the key inversion thing, the one that was RMA'd and replaced, or the non-RMA that is now demonstrating sticky key behavior. Hmm...
Logged
Pages: [1] 2
Print
Jump to:  

Members
Total Members: 2405
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 25
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 18
Total: 18