[fix] restore Linux keyboard injection

This commit is contained in:
dijunkun
2026-07-31 23:57:09 +08:00
parent 34155d0266
commit f809ad173c
5 changed files with 136 additions and 7 deletions
@@ -611,6 +611,7 @@ int KeyboardCapturer::SendWaylandKeyboardCommand(int key_code, bool is_down,
// Prefer keycode injection to preserve physical-key semantics and avoid
// implicit Shift interpretation for uppercase keysyms.
if (display_) {
std::lock_guard<std::mutex> lock(x11_injection_mutex_);
const int keysym = key_it->second;
const KeyCode x11_keycode =
XKeysymToKeycode(display_, static_cast<KeySym>(keysym));