Closed Bug 662219 Opened 13 years ago Closed 13 years ago

ASUS Transformer hardware keyboard deletes two characters when backspace is pressed

Categories

(Firefox for Android Graveyard :: General, defect, P2)

Firefox 5
ARM
Android
defect

Tracking

(fennec+)

RESOLVED DUPLICATE of bug 667927
Tracking Status
fennec + ---

People

(Reporter: kbrosnan, Assigned: blassey)

References

()

Details

(Keywords: mobile, relnote, Whiteboard: [hkb])

Reported from the forums.

backspace on the physical keyboard removes 2 characters unless you hold down shift
Priority: -- → P2
Whiteboard: [hkb]
In addition, some times when just typing, the cursor will skip ahead causing you to type a work incorrectly.
Assignee: nobody → doug.turner
Summary: ASUS Tansformer hardware keyboard deletes two characters when backspace is pressed → ASUS Transformer hardware keyboard deletes two characters when backspace is pressed
i'll look into it as soon as I have a device.
(expected sometime in july)
Doug, FWIW, I got myself a transformer, so i can try things if necessary.
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.
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.
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.
So it looks like we get onKeyDel and onTextChanged in one case and onKeyDel in the other.
Assignee: doug.turner → blassey.bugs
blassey took my transformer.
Web QA has a transformer, if you need a transformer to work with.
tracking-fennec: --- → ?
tracking-fennec: ? → +
I believe that this may be fixed by bug 667927.
I'm skeptical. I don't think the hardware keyboard would be composing...
(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.
hardware keyboards send composition events on android
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)
(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.
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.
(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.
(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.
(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?
I've known about this other problem for a while but was hoping it was the same bug.
Keywords: mobile, relnote
this fixed it:
https://hg.mozilla.org/mozilla-central/rev/10b15bde43e4

so I'm resolving this as a dupe of bug 667927
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.