mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-26 06:22:45 +00:00
Apply new fix for #840
This commit is contained in:
parent
7f24f47978
commit
5843dff278
@ -996,8 +996,14 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static byte getModifierState(KeyEvent event) {
|
// We cannot simply use modifierFlags for all key event processing, because
|
||||||
byte modifier = 0;
|
// some IMEs will not generate real key events for pressing Shift. Instead
|
||||||
|
// they will simply send key events with isShiftPressed() returning true,
|
||||||
|
// and we will need to send the modifier flag ourselves.
|
||||||
|
private byte getModifierState(KeyEvent event) {
|
||||||
|
// Start with the global modifier state to ensure we cover the case
|
||||||
|
// detailed in https://github.com/moonlight-stream/moonlight-android/issues/840
|
||||||
|
byte modifier = getModifierState();
|
||||||
if (event.isShiftPressed()) {
|
if (event.isShiftPressed()) {
|
||||||
modifier |= KeyboardPacket.MODIFIER_SHIFT;
|
modifier |= KeyboardPacket.MODIFIER_SHIFT;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user