mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-16 08:50:40 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3959c01e9 | ||
|
|
ef14f76422 |
No files matched your search
Generated
+1
-1
@@ -2772,7 +2772,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uu-remote-linux"
|
||||
version = "0.2.44"
|
||||
version = "0.2.45"
|
||||
dependencies = [
|
||||
"ab_glyph",
|
||||
"async-trait",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "uu-remote-linux"
|
||||
version = "0.2.44"
|
||||
version = "0.2.45"
|
||||
edition = "2021"
|
||||
default-run = "uuremote-server"
|
||||
authors = ["uu-remote-linux contributors"]
|
||||
|
||||
@@ -640,6 +640,8 @@ GNOME-to-official-Mac bidirectional clipboard synchronization is still unverifie
|
||||
- Frames are decoded at the host's native resolution and scaled to the window with linear filtering; a host resolution
|
||||
change restarts the decoder. `UU_VIEWER_SIZE=WxH` forces a fixed letterboxed canvas instead.
|
||||
|
||||
The SDL remote desktop window disables local IME text composition and forwards physical keys; use the remote host’s input method and its language toggle (for example, Shift) to enter Chinese.
|
||||
|
||||
Mac targets use native macOS keycodes; Windows / Linux targets retain Windows VK. Keys follow physical positions, without
|
||||
automatically translating Ctrl to Command; on a Mac target the PC Super / Windows key acts as Command. Only verified target
|
||||
platform values 1 (Windows / this project's Linux host) and 4 (Mac) are accepted; unknown values fail explicitly. Account
|
||||
|
||||
@@ -563,6 +563,8 @@ GNOME 与官方 Mac 被控端的双向剪贴板尚未验证通过;此修改不
|
||||
以 CaptureSettingSync 回报为准。两种色度均由 FFmpeg 转为 RGB24 显示。
|
||||
- 按被控端原始分辨率解码,窗口缩放使用线性过滤;被控端分辨率变化时自动重启解码器。`UU_VIEWER_SIZE=WxH` 可改为固定的留黑边画布。
|
||||
|
||||
SDL 远程画面窗口关闭本地输入法的文本组合,按物理键转发;输入中文时请使用被控端的输入法及其中英切换键(例如 Shift)。
|
||||
|
||||
Mac 目标使用 macOS 原生键码,Windows / Linux 目标保留 Windows VK。键盘按物理键位置转发,不自动把 Ctrl 改成 Command;
|
||||
控制 Mac 时,PC 键盘的 Super / Win 键对应 Command。仅接受已验证的目标平台值 1(Windows / 本项目 Linux 主机)和 4(Mac),
|
||||
未知值会报错,不猜测键码。账号连接缺少平台字段时查询目标设备;远程协助必须由连接响应提供平台。只看模式不需要此识别。
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
控制端远程窗口不再被本地输入法截获按键。/ The viewer's remote window no longer lets the local IME swallow keys.
|
||||
|
||||
### 修复 / Fixed
|
||||
- **控制端本地输入法截获按键(#149、#150,感谢 @xfjm136)**:SDL 远程桌面窗口创建后关闭本地文本输入,按键只按物理键转发,由被控端输入法处理;修复本地与远端都用 Shift 切换中英文时,Shift 等按键被本地输入法吞掉的问题。不修改系统输入法设置,GTK 启动器不受影响。
|
||||
The SDL remote desktop window now disables local text input after creation, so keys are forwarded as physical keys and the remote IME handles composition; Shift and similar keys are no longer swallowed by the local IME. System IME settings and the GTK launcher are unchanged.
|
||||
|
||||
### 验证范围 / Validation
|
||||
单元测试(含 SDL dummy 子进程测试)与 CI。贡献者在 KDE Wayland + Fcitx5 连接 Windows 实机验证;其他桌面/输入法后端未复测。
|
||||
|
||||
### 下载 / Download
|
||||
`uu-remote-linux_0.2.45_<amd64|arm64>.deb`,或 `uu-remote-linux-v0.2.45-<x86_64|aarch64>-linux.tar.gz`(解压后运行 `./install.sh`),或 `docker pull ghcr.io/vallierdev/uu-remote-linux:v0.2.45`(x86_64)。
|
||||
|
||||
**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.**
|
||||
@@ -19,6 +19,9 @@ impl Window {
|
||||
let name=super::device_label(std::env::var("UU_VIEWER_DEVICE_NAME").ok().as_deref()).to_owned();
|
||||
let window=video.window(&format!("{name} · {}",crate::i18n::s("UU 远程 Linux 控制端","UU Remote Linux viewer")),1280,720).position_centered().resizable().build().map_err(|_|"Window creation failed")?;
|
||||
let mut canvas=window.into_canvas().build().map_err(|_|"Renderer creation failed")?;
|
||||
// This window forwards scancodes, not SDL_TEXTINPUT. SDL enables text input by
|
||||
// default; its X11 IME path can consume keys before KeyDown/KeyUp (#149).
|
||||
video.text_input().stop();
|
||||
// Wayland maps a toplevel only after its first buffer; without this the window stays
|
||||
// invisible until the first decoded frame, which a stalled stream never delivers.
|
||||
canvas.set_draw_color(LOADING_BG);canvas.clear();canvas.present();
|
||||
@@ -708,6 +711,33 @@ async fn pump_type_job(job: &mut TypeJob, session: &mut Session, window: &mut Wi
|
||||
|
||||
#[cfg(test)] mod tests {
|
||||
use super::*;
|
||||
#[cfg_attr(target_os="macos",ignore)]
|
||||
#[test] fn remote_window_disables_local_text_input_and_forwards_shift(){
|
||||
if std::env::var_os("UU_VIEWER_IME_TEST_CHILD").is_none(){
|
||||
let output=std::process::Command::new(std::env::current_exe().unwrap())
|
||||
.args(["--exact","viewer::sdl::tests::remote_window_disables_local_text_input_and_forwards_shift","--test-threads=1"])
|
||||
.env("SDL_VIDEODRIVER","dummy").env("UU_VIEWER_IME_TEST_CHILD","1").output().unwrap();
|
||||
assert!(output.status.success(),"{}{}",String::from_utf8_lossy(&output.stdout),String::from_utf8_lossy(&output.stderr));return
|
||||
}
|
||||
let mut window=Window::new().unwrap();
|
||||
assert!(!window.canvas.window().subsystem().text_input().is_active());
|
||||
let id=window.canvas.window().id();
|
||||
let key=|down,scan|if down {
|
||||
Event::KeyDown{timestamp:0,window_id:id,keycode:None,scancode:Some(scan),keymod:sdl2::keyboard::Mod::NOMOD,repeat:false}
|
||||
}else{
|
||||
Event::KeyUp{timestamp:0,window_id:id,keycode:None,scancode:Some(scan),keymod:sdl2::keyboard::Mod::NOMOD,repeat:false}
|
||||
};
|
||||
let push=|event|window._sdl.event().unwrap().push_event(event).unwrap();
|
||||
use sdl2::keyboard::Scancode as S;
|
||||
for event in [key(true,S::LShift),key(false,S::LShift),key(true,S::A),key(false,S::A),
|
||||
key(true,S::RShift),Event::Window{timestamp:0,window_id:id,win_event:WindowEvent::FocusLost},
|
||||
Event::Window{timestamp:0,window_id:id,win_event:WindowEvent::FocusGained}] {push(event);}
|
||||
let (_,messages)=window.poll(&mut Input::new(false));
|
||||
let keys:Vec<_>=messages.iter().filter_map(|m|Some((m.get("action")?.as_str()?,m.get("key")?.as_i64()?))).collect();
|
||||
assert_eq!(keys,vec![("kbd_press",0xa0),("kbd_release",0xa0),("kbd_press",0x41),("kbd_release",0x41),
|
||||
("kbd_press",0xa1),("kbd_release",0xa1)]);
|
||||
assert!(!window.canvas.window().subsystem().text_input().is_active());
|
||||
}
|
||||
// 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(){
|
||||
|
||||
Reference in new issue
Block a user