зеркало из https://github.com/mozilla/gecko-dev.git
Bug 831144 - Properly pass meta states to Gecko; r=cpeterson
This commit is contained in:
Родитель
bbe1e1cc54
Коммит
b7df88adc8
|
@ -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;
|
||||
|
|
|
@ -1501,10 +1501,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();
|
||||
|
||||
|
@ -1598,6 +1598,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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче