From 310a532abd2e7e7c28d2482e1dffad8ceeb97378 Mon Sep 17 00:00:00 2001 From: djdiskmachine <110535302+djdiskmachine@users.noreply.github.com> Date: Fri, 28 Jul 2023 21:29:34 +0200 Subject: [PATCH] Adds exit/refresh screen button combos Originally from https://github.com/rasprague/m8c-piboy/blob/main/input.c --- input.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/input.c b/input.c index fa0f4ad..46910dd 100644 --- a/input.c +++ b/input.c @@ -470,6 +470,15 @@ input_msg_s get_input_msg(config_params_s *conf) { key = (input_msg_s){special, msg_reset_display}; } + // additional special button combinations by rasprague + if (keycode == (key_select | key_opt | key_up)) { + key = (input_msg_s){special, msg_reset_display}; + } + + if (keycode == (key_select | key_opt | key_down)) { + key = (input_msg_s){special, msg_quit}; + } + if (key.type == normal) { /* Normal input keys go through some event-based manipulation in handle_sdl_events(), the value is stored in keycode variable */