Repository navigation
docs(next): 記下 ydotool 0.1.x 語法未防呆與 Wayland 焦點偵測失效 - #163
Merged
Merged
Conversation
兩件都不影響 26.04(ydotool 是 1.x、portal 熱鍵正常),但在 Ubuntu 24.04 上 會踩到,而且是靜默失敗:貼回打出垃圾字元、log 仍回報成功。修法與退路寫在 NEXT.md 裡。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
yazelin
enabled auto-merge (squash)
August 27, 2026 14:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
兩件在 Ubuntu 24.04 上會踩、在 26.04 上不會的坑,先寫進 NEXT.md,不改 code。
1. ydotool 語法未防呆(靜默失敗)
selection_linux.rs寫死 1.x 的 keycode 語法29:1 47:1 47:0 29:0。Ubuntu 24.04 內建的是 ydotool 0.1.8,只吃名字語法ctrl+v;收到 keycode 語法會 exit 0 但送出錯的鍵(實測42:1 42:0送出 keycode 5 = 數字鍵4),結果是焦點視窗被打進垃圾字元、log 卻回報「貼回完成」。修法照抄 mori-ear 的
ydotool_wants_named_keys:跑一次ydotool key --help,說明裡有「separated by plus」就是 0.1.x。2. Wayland 下 terminal 偵測失效
capture_window_context()靠xdotool getactivewindow,Wayland 下必失敗 →process_name空字串 →needs_shift_for_paste("")回 false → 一律送 Ctrl+V,貼進終端機不會有反應。退路已經有:voice profile 的USER-*.mdfrontmatter 寫paste_shortcut: ctrl+shift+v。兩件都在 mori-ear 上實測確認過(同一台 24.04 + GNOME 46 Wayland)。
🤖 Generated with Claude Code