From 8fb57b421d54459b2789598b49103e73f0b53772 Mon Sep 17 00:00:00 2001 From: VallierDev <24893073+VallierDev@users.noreply.github.com> Date: Sun, 18 Oct 2026 07:26:26 +0800 Subject: [PATCH] Release v0.2.6: input diagnostics (#46), Mac terminal fix Log unsupported CONTROL input actions (names only) and the server NumLock state for numpad keys; skip the SDL window test on macOS (main-thread SDL). Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/release-notes/v0.2.6.md | 19 +++++++++++++++++++ src/input.rs | 8 ++++++++ src/viewer/sdl.rs | 2 ++ src/webrtc.rs | 10 ++++++++++ 6 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 docs/release-notes/v0.2.6.md diff --git a/Cargo.lock b/Cargo.lock index c4c9f47..26688ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2741,7 +2741,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uu-remote-linux" -version = "0.2.5" +version = "0.2.6" dependencies = [ "async-trait", "base64 0.22.1", diff --git a/Cargo.toml b/Cargo.toml index a992ae7..7beb8cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uu-remote-linux" -version = "0.2.5" +version = "0.2.6" edition = "2021" default-run = "uuremote-server" authors = ["uu-remote-linux contributors"] diff --git a/docs/release-notes/v0.2.6.md b/docs/release-notes/v0.2.6.md new file mode 100644 index 0000000..83633c4 --- /dev/null +++ b/docs/release-notes/v0.2.6.md @@ -0,0 +1,19 @@ +控制端可打开官方 Mac 被控端的终端;输入问题诊断日志。/ Viewer terminal works with the official Mac host; input diagnostics. + +### 控制端修复 / Viewer — fixed +- **连接官方 Mac 被控端的终端**:之前一连上就断开(「Terminal channel closed」)。Mac 被控端把终端的应答发在终端通道上, + 控制端现在能识别。已实机验证:可打开终端并正常回显。Mac 被控端的端口映射也已实测可用。 + Terminal sessions with the official Mac host now open (verified live); port mapping with it was verified too. + +### 主机端诊断 / Host diagnostics(#46) +- 收到不认识的输入事件时记一条日志(只有动作名和字段名,**不含输入内容**),用于排查手机输入法打字无反应。 +- 小键盘按键记录被控端当前的 NumLock 状态(只记开/关,不记按键),用于排查小键盘不出数字。 +- Logs unsupported input actions (names only, never typed text) and the server's NumLock state for numpad keys. + +### 其他 / Other +- README 标题与开头加入控制端介绍并放上截图(#44)。 + +### 下载 / Download +`uu-remote-linux-v0.2.6-x86_64-linux.tar.gz`:主机 `uuremote-server`(X11 版)与控制端 `uuremote-viewer`(x86_64,glibc ≥ 2.35;控制端需 SDL2、GTK3、ffmpeg),附带 `contrib/`。 + +**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.** diff --git a/src/input.rs b/src/input.rs index df37f27..358dc84 100644 --- a/src/input.rs +++ b/src/input.rs @@ -248,6 +248,14 @@ impl InputInjector { if AUDIT.fetch_add(1,std::sync::atomic::Ordering::Relaxed) < 8 { log::info!("Desktop keyboard injection outcome: result={result}"); } + // KP_0..KP_9 type digits only with NumLock on (#46); record the server's NumLock state, not the key. + static NUMPAD: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0); + if (0x60..=0x6f).contains(&key) && is_press && self.backend==crate::desktop_backend::DesktopBackend::X11 + && NUMPAD.fetch_add(1,std::sync::atomic::Ordering::Relaxed) < 4 { + let (mut x,mut y,mut mask)=(0,0,0u32); + let state=unsafe { x11_pointer_state(&mut x,&mut y,&mut mask) }; + log::info!("Desktop numpad key: result={result} numlock={}", state==0 && mask & 0x10 != 0); + } if result == 0 { let mut held=self.held.lock().unwrap(); if is_press {held.keys.insert(symbol);} else {held.keys.remove(&symbol);} diff --git a/src/viewer/sdl.rs b/src/viewer/sdl.rs index 5c60eaa..6330d31 100644 --- a/src/viewer/sdl.rs +++ b/src/viewer/sdl.rs @@ -163,6 +163,8 @@ pub async fn run(session:&mut Session,window:&mut Window,decoder:&mut dyn super: #[cfg(test)] mod tests { use super::*; + // macOS: SDL video must start on the main thread, which the test harness does not use; CI runs it on Linux. + #[cfg_attr(target_os="macos",ignore)] #[tokio::test] async fn clipboard_requests_use_existing_window(){ if std::env::var_os("UU_VIEWER_CLIPBOARD_TEST_CHILD").is_none(){ let output=std::process::Command::new(std::env::current_exe().unwrap()) diff --git a/src/webrtc.rs b/src/webrtc.rs index ae6ecb1..d3a14c6 100644 --- a/src/webrtc.rs +++ b/src/webrtc.rs @@ -1071,6 +1071,16 @@ impl WebRtcSession { });} }, + Ok(crate::control_protocol::ControlMessage::Unsupported(v)) => { + // Action name and key names only, never values (an IME text event would carry typed text). + static UNSUPPORTED: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0); + if UNSUPPORTED.fetch_add(1, std::sync::atomic::Ordering::Relaxed) < 16 { + let action = v.get("action").and_then(serde_json::Value::as_str) + .filter(|a| a.len() <= 40 && a.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'_')).unwrap_or("?"); + let keys: Vec<&str> = v.as_object().map(|o| o.keys().map(String::as_str).take(12).collect()).unwrap_or_default(); + log::info!("Unsupported CONTROL input: action={action} keys={keys:?}"); + } + }, _ => {} } } else if channel_name.contains("STREAMER") {