Bug 865649 part.5 Set KeyboardEvent.code value on Android and Gonk r=smaug+nchen+mwu

This commit is contained in:
Masayuki Nakano
2014-05-25 11:09:00 +09:00
parent 26aa7c6560
commit d0d0af96fc
7 changed files with 197 additions and 1 deletions

View File

@@ -205,6 +205,7 @@ public class GeckoEvent {
private int mMetaState;
private int mFlags;
private int mKeyCode;
private int mScanCode;
private int mUnicodeChar;
private int mBaseUnicodeChar; // mUnicodeChar without meta states applied
private int mDOMPrintableKeyValue;
@@ -294,6 +295,7 @@ public class GeckoEvent {
mMetaState = k.getMetaState() | metaState;
mFlags = k.getFlags();
mKeyCode = k.getKeyCode();
mScanCode = k.getScanCode();
mUnicodeChar = k.getUnicodeChar(mMetaState);
// e.g. for Ctrl+A, Android returns 0 for mUnicodeChar,
// but Gecko expects 'a', so we return that in mBaseUnicodeChar