Add shortcut for ESC key on a L+R+Right

This commit is contained in:
rock88 2020-05-08 22:01:46 +03:00
parent 3d35aaa523
commit f0ad543051

View file

@ -165,6 +165,16 @@ void InputController::send_to_stream() {
LiSendKeyboardEvent(0x0D, KEY_ACTION_UP, MODIFIER_ALT);
}
static bool send_escape = false;
if (!send_escape && GAME_PAD_COMBO(RIGHT_FLAG)) {
send_escape = true;
LiSendKeyboardEvent(0x1B, KEY_ACTION_DOWN, 0);
} else if (send_escape && !GAME_PAD_COMBO(RIGHT_FLAG)) {
send_escape = false;
LiSendKeyboardEvent(0x1B, KEY_ACTION_UP, 0);
}
LiSendControllerEvent(
game_pad_state.buttonFlags,
game_pad_state.leftTrigger,