mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-03 16:25:28 +00:00
Added MetaKey(WindowKey) Packet
Allows you to use Windows key combinations. ex) Win+Tab , Win+D
This commit is contained in:
parent
56eddff8d6
commit
26bff28e4d
@ -1164,6 +1164,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
androidKeyCode == KeyEvent.KEYCODE_ALT_RIGHT) {
|
||||
modifierMask = KeyboardPacket.MODIFIER_ALT;
|
||||
}
|
||||
else if (androidKeyCode == KeyEvent.KEYCODE_META_LEFT ||
|
||||
androidKeyCode == KeyEvent.KEYCODE_META_RIGHT) {
|
||||
modifierMask = KeyboardPacket.MODIFIER_META;
|
||||
}
|
||||
|
||||
if (down) {
|
||||
this.modifierFlags |= modifierMask;
|
||||
@ -1226,6 +1230,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
if (event.isAltPressed()) {
|
||||
modifier |= KeyboardPacket.MODIFIER_ALT;
|
||||
}
|
||||
if (event.isMetaPressed()) {
|
||||
modifier |= KeyboardPacket.MODIFIER_META;
|
||||
}
|
||||
return modifier;
|
||||
}
|
||||
|
||||
|
@ -7,4 +7,5 @@ public class KeyboardPacket {
|
||||
public static final byte MODIFIER_SHIFT = 0x01;
|
||||
public static final byte MODIFIER_CTRL = 0x02;
|
||||
public static final byte MODIFIER_ALT = 0x04;
|
||||
public static final byte MODIFIER_META = 0x08;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user