From 8597609c3b667e55cdd1a3173105c3f32bc4ff9d Mon Sep 17 00:00:00 2001 From: vasilito Date: Fri, 24 Jul 2026 11:58:14 +0900 Subject: [PATCH] evdevd: read raw input tap (consumer_raw), bump base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Point evdevd at /scheme/input/consumer_raw (the new raw device tap added in base bd5e3db3) instead of /scheme/input/consumer. The console consumer handed evdevd keymapped, VT-gated events — it only received input while its own VT was active, and the character had already been keymapped, both wrong for a libinput/xkbcommon (Wayland) feed. The raw tap delivers the pre-keymap event stream for every device event regardless of the active VT, matching the Linux evdev contract. evdevd only ever used scancode+pressed (never character), so no translation change is needed on its side. Bumps the base submodule pointer to include the consumer_raw tap. Part of the Linux-aligned input-stack consolidation (local/docs/INPUT-STACK-LINUX-ALIGNMENT-PLAN.md). Compile-checked for x86_64-unknown-redox. --- local/recipes/system/evdevd/source/src/main.rs | 13 ++++++++++--- local/sources/base | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/local/recipes/system/evdevd/source/src/main.rs b/local/recipes/system/evdevd/source/src/main.rs index 2c10cfd5e4..34ea2f4efa 100644 --- a/local/recipes/system/evdevd/source/src/main.rs +++ b/local/recipes/system/evdevd/source/src/main.rs @@ -60,11 +60,18 @@ struct InputConsumer { impl InputConsumer { fn open() -> Result { + // Open the RAW device tap, not the console consumer. The raw tap gives us + // the pre-keymap event stream for every device event regardless of the + // active VT — the Linux `evdev` contract that libinput/xkbcommon expect. + // Reading the plain `/scheme/input/consumer` instead (the old wiring) + // handed evdevd keymapped, VT-gated events: it only saw input while its + // own VT was foregrounded and the `character` had already been mapped, + // which is wrong for a Wayland/libinput feed. let file = OpenOptions::new() .read(true) .custom_flags(O_NONBLOCK as i32) - .open("/scheme/input/consumer") - .map_err(|e| format!("failed to open /scheme/input/consumer: {e}"))?; + .open("/scheme/input/consumer_raw") + .map_err(|e| format!("failed to open /scheme/input/consumer_raw: {e}"))?; Ok(Self { file, @@ -253,7 +260,7 @@ fn run() -> Result<(), String> { redox_scheme::scheme::register_sync_scheme(&socket, "evdev", &mut scheme) .map_err(|e| format!("failed to register evdev scheme: {}", e))?; info!("evdevd: registered scheme:evdev"); - info!("evdevd: consuming orbclient::Event from /scheme/input/consumer"); + info!("evdevd: consuming raw orbclient::Event from /scheme/input/consumer_raw"); #[cfg(target_os = "redox")] { diff --git a/local/sources/base b/local/sources/base index 2d03559d14..bd5e3db32a 160000 --- a/local/sources/base +++ b/local/sources/base @@ -1 +1 @@ -Subproject commit 2d03559d14a3b549f65e58cab6450f881065f06e +Subproject commit bd5e3db32a3c72f530960fcf726d0219b8161d78