Last Comment Bug 662219 - ASUS Transformer hardware keyboard deletes two characters when backspace is pressed
: ASUS Transformer hardware keyboard deletes two characters when backspace is p...
Status: RESOLVED DUPLICATE of bug 667927
[hkb]
: mobile, relnote
Product: Fennec Graveyard
Classification: Graveyard
Component: General (show other bugs)
: Firefox 5
: ARM Android
: P2 normal (vote)
: ---
Assigned To: Brad Lassey [:blassey] (use needinfo?)
:
Mentors:
https://support.mozilla.com/en-US/que...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-05 21:42 PDT by Kevin Brosnan [:kbrosnan]
Modified: 2011-08-09 22:09 PDT (History)
8 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Kevin Brosnan [:kbrosnan] 2011-06-05 21:42:28 PDT
Reported from the forums.

backspace on the physical keyboard removes 2 characters unless you hold down shift
Comment 1 sseed 2011-06-20 17:04:18 PDT
In addition, some times when just typing, the cursor will skip ahead causing you to type a work incorrectly.
Comment 2 Doug Turner (:dougt) 2011-06-20 18:10:10 PDT
i'll look into it as soon as I have a device.
Comment 3 Doug Turner (:dougt) 2011-06-22 13:46:32 PDT
(expected sometime in july)
Comment 4 Mike Hommey [:glandium] 2011-07-05 06:12:40 PDT
Doug, FWIW, I got myself a transformer, so i can try things if necessary.
Comment 5 Doug Turner (:dougt) 2011-07-05 08:12:08 PDT
Hey Mike, thanks.

To start with, I check to see why we are getting two events.  We generate the IME events here:

http://mxr.mozilla.org/mozilla-central/source/embedding/android/GeckoInputConnection.java

my guess is that the onTextChange and deleteSurroundingText are both sending delete.
Comment 6 Mike Hommey [:glandium] 2011-07-05 10:32:27 PDT
D/GeckoAppJava( 3966): IME: onKeyDel
D/GeckoAppJava( 3966): IME: onTextChanged
D/GeckoAppJava( 3966): IME: notifySelectionChange
D/GeckoAppJava( 3966): IME: notifyTextChange
D/GeckoAppJava( 3966): IME: notifySelectionChange
D/GeckoAppJava( 3966): IME: getTextBeforeCursor
D/GeckoAppJava( 3966): IME: getTextAfterCursor
D/GeckoAppJava( 3966): IME: notifyTextChange
D/GeckoAppJava( 3966): IME: notifySelectionChange
D/GeckoAppJava( 3966): IME: getCursorCapsMode
D/GeckoAppJava( 3966): IME: getTextBeforeCursor
D/GeckoAppJava( 3966): IME: getTextAfterCursor
D/GeckoAppJava( 3966): IME: getCursorCapsMode
D/GeckoAppJava( 3966): IME: getTextBeforeCursor
D/GeckoAppJava( 3966): IME: getTextAfterCursor
D/GeckoAppJava( 3966): IME: getCursorCapsMode

These are the functions that get called when pressing backspace once.
Comment 7 Mike Hommey [:glandium] 2011-07-05 10:33:45 PDT
D/GeckoAppJava( 3966): IME: getCursorCapsMode
D/GeckoAppJava( 3966): IME: onKeyDel
D/GeckoAppJava( 3966): IME: notifyTextChange
D/GeckoAppJava( 3966): IME: notifySelectionChange
D/GeckoAppJava( 3966): IME: getTextBeforeCursor
D/GeckoAppJava( 3966): IME: getTextAfterCursor
D/GeckoAppJava( 3966): IME: getCursorCapsMode

And these are the ones caled when pressing backspace once on the software keyboard.
Comment 8 Mike Hommey [:glandium] 2011-07-05 10:34:59 PDT
So it looks like we get onKeyDel and onTextChanged in one case and onKeyDel in the other.
Comment 9 Doug Turner (:dougt) 2011-07-18 14:59:26 PDT
blassey took my transformer.
Comment 10 Naoki Hirata :nhirata (please use needinfo instead of cc) 2011-07-20 15:01:36 PDT
Web QA has a transformer, if you need a transformer to work with.
Comment 11 Makoto Kato [:m_kato] (PTO 6/20-21, 6/24) 2011-08-03 00:11:24 PDT
I believe that this may be fixed by bug 667927.
Comment 12 Mike Hommey [:glandium] 2011-08-03 00:37:35 PDT
I'm skeptical. I don't think the hardware keyboard would be composing...
Comment 13 Mike Hommey [:glandium] 2011-08-03 00:42:31 PDT
(In reply to comment #12)
> I'm skeptical. I don't think the hardware keyboard would be composing...

Ah, reading the code, it makes sense.
Comment 14 Brad Lassey [:blassey] (use needinfo?) 2011-08-03 00:43:15 PDT
hardware keyboards send composition events on android
Comment 15 Mike Hommey [:glandium] 2011-08-03 00:47:59 PDT
Unfortunately, the fix from bug 667927 makes things much worse: backspace now does work properly, but nothing can be typed at all now. (I did check backspace after writing a few characters with the software keyboard)
Comment 16 Mike Hommey [:glandium] 2011-08-03 00:50:07 PDT
(In reply to comment #14)
> hardware keyboards send composition events on android

that doesn't make much sense. but that wouldn't be the first time something is done that makes no sense.
Comment 17 Makoto Kato [:m_kato] (PTO 6/20-21, 6/24) 2011-08-05 00:26:07 PDT
Does anyone test http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/m_kato@ga2.so-net.ne.jp-84be61a9275a/try-android/fennec-8.0a1.en-US.android-arm.apk?

(In reply to Mike Hommey [:glandium] from comment #16)
> (In reply to comment #14)
> > hardware keyboards send composition events on android
> 
> that doesn't make much sense. but that wouldn't be the first time something
> is done that makes no sense.

Unfortunately, IME support for hardware keyboard is broken now. (Bug 676195). If using IME such as OpenWnn with hardware key, IME should handle most keyboard event.
Comment 18 Mike Hommey [:glandium] 2011-08-05 01:13:15 PDT
(In reply to Makoto Kato from comment #17)
> Does anyone test
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/m_kato@ga2.so-net.
> ne.jp-84be61a9275a/try-android/fennec-8.0a1.en-US.android-arm.apk?

This build works for me.

There is another problem, though: if i type fast enough, letters are inserted into the text intead of appending to it. That is, if I type "qwerty" fast enough, I can end up with something like "qwrtye" (or worse combinations), with the cursor after the y. Looks like it adds the second character at the cursor location before the cursor is updated to go after the previously added character.
Comment 19 Mike Hommey [:glandium] 2011-08-05 01:15:48 PDT
(In reply to Mike Hommey [:glandium] from comment #18)
> There is another problem, though: if i type fast enough, letters are
> inserted into the text intead of appending to it. That is, if I type
> "qwerty" fast enough, I can end up with something like "qwrtye" (or worse
> combinations), with the cursor after the y. Looks like it adds the second
> character at the cursor location before the cursor is updated to go after
> the previously added character.

This however isn't new. I will file a new bug.
Comment 20 Brad Lassey [:blassey] (use needinfo?) 2011-08-05 08:26:41 PDT
(In reply to Mike Hommey [:glandium] from comment #19)
> (In reply to Mike Hommey [:glandium] from comment #18)
> > There is another problem, though: if i type fast enough, letters are
> > inserted into the text intead of appending to it. That is, if I type
> > "qwerty" fast enough, I can end up with something like "qwrtye" (or worse
> > combinations), with the cursor after the y. Looks like it adds the second
> > character at the cursor location before the cursor is updated to go after
> > the previously added character.
> 
> This however isn't new. I will file a new bug.

can you try the patch on bug 653895?
Comment 21 sseed 2011-08-05 08:44:59 PDT
I've known about this other problem for a while but was hoping it was the same bug.
Comment 22 Brad Lassey [:blassey] (use needinfo?) 2011-08-09 22:09:42 PDT
this fixed it:
https://hg.mozilla.org/mozilla-central/rev/10b15bde43e4

so I'm resolving this as a dupe of bug 667927

*** This bug has been marked as a duplicate of bug 667927 ***

Note You need to log in before you can comment on or make changes to this bug.