mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-04 00:35:47 +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) {
|
androidKeyCode == KeyEvent.KEYCODE_ALT_RIGHT) {
|
||||||
modifierMask = KeyboardPacket.MODIFIER_ALT;
|
modifierMask = KeyboardPacket.MODIFIER_ALT;
|
||||||
}
|
}
|
||||||
|
else if (androidKeyCode == KeyEvent.KEYCODE_META_LEFT ||
|
||||||
|
androidKeyCode == KeyEvent.KEYCODE_META_RIGHT) {
|
||||||
|
modifierMask = KeyboardPacket.MODIFIER_META;
|
||||||
|
}
|
||||||
|
|
||||||
if (down) {
|
if (down) {
|
||||||
this.modifierFlags |= modifierMask;
|
this.modifierFlags |= modifierMask;
|
||||||
@ -1226,6 +1230,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
if (event.isAltPressed()) {
|
if (event.isAltPressed()) {
|
||||||
modifier |= KeyboardPacket.MODIFIER_ALT;
|
modifier |= KeyboardPacket.MODIFIER_ALT;
|
||||||
}
|
}
|
||||||
|
if (event.isMetaPressed()) {
|
||||||
|
modifier |= KeyboardPacket.MODIFIER_META;
|
||||||
|
}
|
||||||
return modifier;
|
return modifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,4 +7,5 @@ public class KeyboardPacket {
|
|||||||
public static final byte MODIFIER_SHIFT = 0x01;
|
public static final byte MODIFIER_SHIFT = 0x01;
|
||||||
public static final byte MODIFIER_CTRL = 0x02;
|
public static final byte MODIFIER_CTRL = 0x02;
|
||||||
public static final byte MODIFIER_ALT = 0x04;
|
public static final byte MODIFIER_ALT = 0x04;
|
||||||
|
public static final byte MODIFIER_META = 0x08;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user