From aade760d835a0de6de37e1f61092e75133c4e8b3 Mon Sep 17 00:00:00 2001 From: dianjixz <18637716021@163.com> Date: Wed, 17 Jun 2026 14:08:21 +0800 Subject: [PATCH] Disable keyboard device grab --- .../cp0_lvgl/src/cp0/cp0_lvgl_keyboard.c | 16 +++++++--------- scripts/debian_packager.py | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ext_components/cp0_lvgl/src/cp0/cp0_lvgl_keyboard.c b/ext_components/cp0_lvgl/src/cp0/cp0_lvgl_keyboard.c index b8e29e5..1494b74 100644 --- a/ext_components/cp0_lvgl/src/cp0/cp0_lvgl_keyboard.c +++ b/ext_components/cp0_lvgl/src/cp0/cp0_lvgl_keyboard.c @@ -217,15 +217,13 @@ static int open_restricted(const char *path, int flags, void *user_data) { fprintf(stderr, "Failed to open %s: %s\n", path, strerror(errno)); return -errno; } - /* Grab the device exclusively. Without this, the kernel VT keyboard - * handler also feeds keystrokes from the integrated TCA8418 keypad to - * the foreground tty — leaking keys into any shell on tty1 / HDMI - * console at the same time APPLaunch is reading them. EBUSY here is - * non-fatal: another grabber already holds it, libinput will read - * normally without the VT-leak protection. */ - if (ioctl(fd, EVIOCGRAB, 1) < 0 && errno != EBUSY) { - fprintf(stderr, "[KBD] EVIOCGRAB %s failed: %s\n", path, strerror(errno)); - } + /* Keyboard grabbing is intentionally disabled so other programs can read + * the same input device while APPLaunch is running. + * + * if (ioctl(fd, EVIOCGRAB, 1) < 0 && errno != EBUSY) { + * fprintf(stderr, "[KBD] EVIOCGRAB %s failed: %s\n", path, strerror(errno)); + * } + */ return fd; } static void close_restricted(int fd, void *user_data) { close(fd); } diff --git a/scripts/debian_packager.py b/scripts/debian_packager.py index 7d9ba38..f180037 100755 --- a/scripts/debian_packager.py +++ b/scripts/debian_packager.py @@ -25,7 +25,7 @@ PACKAGE_NAME = "applaunch" APP_NAME = "APPLaunch" BIN_NAME = "M5CardputerZero-APPLaunch" -DEFAULT_VERSION = "0.2.1" +DEFAULT_VERSION = "0.6.0" DEFAULT_REVISION = "m5stack1" DEFAULT_ARCHITECTURE = "arm64"