Open GoogleCodeExporter opened 9 years ago
I got Shortyz running on my phone with the debugger attached and found a fix to
this bug.
In PlayActivity.onKeyUp for a normal 'P' form the keyboard this is the KeyEvent
data:
KeyEvent{action=0 code=112 repeat=0 meta=0 scancode=0 mFlags=6}
When the S-Pen stylus contacts the screen this event is sent:
KeyEvent{action=1 code=112 repeat=0 meta=0 scancode=544 mFlags=8}
Shortyz needs to ignore this but I'm not sure what combination of action/mFlags
is best to use to filter out this event. The following works, but I'm not sure
it will work on a device with a physical keyboard. I don't have one to test
with.
For near the end of the PlayActivity.onKeyUp method:
if (ALPHA.indexOf(c) != -1) {
if ((event.getFlags() & KeyEvent.FLAG_SOFT_KEYBOARD) == KeyEvent.FLAG_SOFT_KEYBOARD) {
previous = BOARD.playLetter(c);
this.render(previous);
return true;
}
}
Original comment by mrmik...@gmail.com
on 22 Feb 2012 at 7:28
For a temp workaround, the P will not be entered If you deselect XT9 on your
keyboard options.
Also for the Note, it appears as if the Pen input registers slightly to the
right of where you tap the screen.
Original comment by jmhar...@gmail.com
on 5 Jul 2012 at 11:07
I also get the random 'P' character on my Droid X when I accidentally press the
camera button on the side of the phone, which happens fairly regularly because
of the button's position.
Original comment by oston...@gmail.com
on 12 Sep 2012 at 2:33
Original issue reported on code.google.com by
mrmik...@gmail.com
on 8 Feb 2012 at 5:32