mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 831144 - Properly pass meta states to Gecko; r=cpeterson
This commit is contained in:
parent
9c7a020058
commit
02ee1b5198
@ -194,6 +194,10 @@ public class GeckoEvent {
|
||||
mFlags = k.getFlags();
|
||||
mKeyCode = k.getKeyCode();
|
||||
mUnicodeChar = k.getUnicodeChar();
|
||||
if (mUnicodeChar == 0) {
|
||||
// e.g. for Ctrl+A, Android returns 0, but Gecko expects 'a' as mUnicodeChar
|
||||
mUnicodeChar = k.getUnicodeChar(0);
|
||||
}
|
||||
mRepeatCount = k.getRepeatCount();
|
||||
mCharacters = k.getCharacters();
|
||||
mDomKeyLocation = isJoystickButton(mKeyCode) ? DOM_KEY_LOCATION_JOYSTICK : DOM_KEY_LOCATION_MOBILE;
|
||||
|
@ -1511,10 +1511,10 @@ nsWindow::InitKeyEvent(nsKeyEvent& event, AndroidGeckoEvent& key,
|
||||
event.pluginEvent = pluginEvent;
|
||||
}
|
||||
|
||||
event.InitBasicModifiers(gMenu,
|
||||
event.InitBasicModifiers(gMenu || key.IsCtrlPressed(),
|
||||
key.IsAltPressed(),
|
||||
key.IsShiftPressed(),
|
||||
false);
|
||||
key.IsMetaPressed());
|
||||
event.location = key.DomKeyLocation();
|
||||
event.time = key.Time();
|
||||
|
||||
@ -1608,6 +1608,8 @@ nsWindow::OnKeyEvent(AndroidGeckoEvent *ae)
|
||||
case AndroidKeyEvent::KEYCODE_SHIFT_RIGHT:
|
||||
case AndroidKeyEvent::KEYCODE_ALT_LEFT:
|
||||
case AndroidKeyEvent::KEYCODE_ALT_RIGHT:
|
||||
case AndroidKeyEvent::KEYCODE_CTRL_LEFT:
|
||||
case AndroidKeyEvent::KEYCODE_CTRL_RIGHT:
|
||||
firePress = false;
|
||||
break;
|
||||
case AndroidKeyEvent::KEYCODE_BACK:
|
||||
|
Loading…
Reference in New Issue
Block a user