Discussion:
Problem with three keys pressed
Paolo Iommarini
2012-05-05 11:46:10 UTC
Permalink
Hi,

I have a problem when three keys are pressed (I have the english keyboard).
There are some keys combination that generates an additional key press.
This seems a system bug.

It can be reproduced in any textbox (like the contact search).
If you press a+x+up arrow you'll see a "p".

I noticed it while using the Game Gripper with the psx emulator: pressing
down+left+circle will end in a down+left+triangle+circle combination.
I debugged the key-press-event and it is really getting a press event for
the key "p" (code 33).

There are also other strange keys combination like
a+x+return = ","
a+x+. = "o."

Can someone please test it and say if it's really a system bug?

Thanks
Paolo
Matan Ziv-Av
2012-05-05 12:54:07 UTC
Permalink
On Sat, 5 May 2012, Paolo Iommarini wrote:

> I have a problem when three keys are pressed (I have the english keyboard).
> There are some keys combination that generates an additional key press.
> This seems a system bug.
>
> It can be reproduced in any textbox (like the contact search).
> If you press a+x+up arrow you'll see a "p".
>
> I noticed it while using the Game Gripper with the psx emulator: pressing
> down+left+circle will end in a down+left+triangle+circle combination.
> I debugged the key-press-event and it is really getting a press event for the
> key "p" (code 33).
>
> There are also other strange keys combination like
> a+x+return = ","
> a+x+. = "o."
>
> Can someone please test it and say if it's really a system bug?

This is a hardware issue. And there are more combinations revealing this
issue. See for example here:

http://talk.maemo.org/archive/index.php/t-40806.html

I believe it is possible to recognize the fake key press/release events
by analyzing the timing of those events, thus discarding these events
and working around the hardware problem. But to my knowledge, noone has
done it yet, and I do not expect anyone to actually do it.

--
Matan Ziv-Av. ***@svgalib.org
Paolo Iommarini
2012-05-05 13:08:33 UTC
Permalink
I thought it might be an hardware issue...
Too bad, I'll try to find a workaround.

Many thanks

> On Sat, 5 May 2012, Paolo Iommarini wrote:
>
>> I have a problem when three keys are pressed (I have the english
>> keyboard).
>> There are some keys combination that generates an additional key press.
>> This seems a system bug.
>>
>> It can be reproduced in any textbox (like the contact search).
>> If you press a+x+up arrow you'll see a "p".
>>
>> I noticed it while using the Game Gripper with the psx emulator:
>> pressing down+left+circle will end in a down+left+triangle+circle
>> combination.
>> I debugged the key-press-event and it is really getting a press event
>> for the key "p" (code 33).
>>
>> There are also other strange keys combination like
>> a+x+return = ","
>> a+x+. = "o."
>>
>> Can someone please test it and say if it's really a system bug?
>
> This is a hardware issue. And there are more combinations revealing this
> issue. See for example here:
>
> http://talk.maemo.org/archive/index.php/t-40806.html
>
> I believe it is possible to recognize the fake key press/release events
> by analyzing the timing of those events, thus discarding these events
> and working around the hardware problem. But to my knowledge, noone has
> done it yet, and I do not expect anyone to actually do it.
k***@nokia.com
2012-05-06 01:23:26 UTC
Permalink
On Saturday, May 05, 2012, Paolo wrote:

> I thought it might be an hardware issue...

That is a phenomon called ghost-key. This is something inherent in matrix-keyboards.

http://www.dribin.org/dave/keyboard/one_html/

> Too bad, I'll try to find a workaround.

The only workaround is to suppress the 3'rd key (which will appear as two new keys) if the pressed keys form a rectangle in the keyboard matrix.
________________________________________
From: maemo-developers-***@maemo.org [maemo-developers-***@maemo.org] on behalf of ext Paolo Iommarini [***@yahoo.it]
Sent: Saturday, May 05, 2012 9:08 PM
To: maemo-developers
Subject: Re: Problem with three keys pressed

I thought it might be an hardware issue...
Too bad, I'll try to find a workaround.

Many thanks

> On Sat, 5 May 2012, Paolo Iommarini wrote:
>
>> I have a problem when three keys are pressed (I have the english
>> keyboard).
>> There are some keys combination that generates an additional key press.
>> This seems a system bug.
>>
>> It can be reproduced in any textbox (like the contact search).
>> If you press a+x+up arrow you'll see a "p".
>>
>> I noticed it while using the Game Gripper with the psx emulator:
>> pressing down+left+circle will end in a down+left+triangle+circle
>> combination.
>> I debugged the key-press-event and it is really getting a press event
>> for the key "p" (code 33).
>>
>> There are also other strange keys combination like
>> a+x+return = ","
>> a+x+. = "o."
>>
>> Can someone please test it and say if it's really a system bug?
>
> This is a hardware issue. And there are more combinations revealing this
> issue. See for example here:
>
> http://talk.maemo.org/archive/index.php/t-40806.html
>
> I believe it is possible to recognize the fake key press/release events
> by analyzing the timing of those events, thus discarding these events
> and working around the hardware problem. But to my knowledge, noone has
> done it yet, and I do not expect anyone to actually do it.
Paolo Iommarini
2012-05-06 10:36:41 UTC
Permalink
> The only workaround is to suppress the 3'rd key (which will appear as
> two new keys) if the pressed keys form a rectangle in the keyboard
> matrix.
I tried but it's really not easy (maybe impossible).
If the three keys are pressed simultaneously the order of the key press
event is "random".

Also in the case of a+x+up arrow I get a sequence of:
Key: 111 Pressed time 1175712370
Key: 33 Pressed time 1175712398
Key: 38 Pressed time 1175712398
Key: 53 Pressed time 1175712398

But if I press a+x+p (which is the ghost key I get using the previous
sequence) I get:
Key: 38 Pressed time 1175773269
Key: 53 Pressed time 1175773269
Key: 33 Pressed time 1175773284
Key: 111 Pressed time 1175773284

The key with code 33 (the p) is always fired before the 111 (up arrow) so
there's no way I can say if the user really pressed the p or the up arrow.
k***@nokia.com
2012-05-07 03:04:53 UTC
Permalink
On Saturday, May 06, 2012, Paolo wrote:

> > The only workaround is to suppress the 3'rd key (which will appear as
> > two new keys) if the pressed keys form a rectangle in the keyboard
> > matrix.
> I tried but it's really not easy (maybe impossible).

There is only one way to "fix" the ghost key problem - that is to suppress all *new* key events that are part of a ghost key "rectangle".

> Also in the case of a+x+up arrow I get a sequence of:
> Key: 111 Pressed time 1175712370

Key event 111 send

> Key: 33 Pressed time 1175712398
> Key: 38 Pressed time 1175712398
> Key: 53 Pressed time 1175712398

Suppress all.

> But if I press a+x+p (which is the ghost key I get using the previous
> sequence) I get:
> Key: 38 Pressed time 1175773269
> Key: 53 Pressed time 1175773269'

Key event 38 and 53 send

> Key: 33 Pressed time 1175773284
> Key: 111 Pressed time 1175773284

Both suppressed


> The key with code 33 (the p) is always fired before the 111 (up arrow) so
> there's no way I can say if the user really pressed the p or the up arrow.

No that is the point - from the HW point of view there is no way to see which
one is really pressed.

The only thing you can do is to hide the problem.
Joerg Reisenweber
2012-05-09 13:57:15 UTC
Permalink
see http://wiki.maemo.org/N900_Hardware_Subsystems#Keyboard where I elaborated
about the problem, though only regarding qualifier keys (Fn, Shift, Ctrl)

/j
Loading...