Why is key press simulation not working for Niri ? #1040
-
Hi! I tried to make sense of the Niri Backend to understand why hotkey press simulation doesn't work but I couldn't figure it out and the reason why is not given in the documentation. Do you happen to know why? Perhaps you know why @make-42 since you're the person who worked on the MR for the Niri integration? Thank you for anyone who will take the time to answer my question! ❤️ |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
-
I'll have a look give me a sec |
Beta Was this translation helpful? Give feedback.
-
do all key press simulations not work? or it is just to trigger a shortcut defined in the Niri configuration? |
Beta Was this translation helpful? Give feedback.
-
The used protocol is supported by Niri and I believe that in my testing having it type letters worked |
Beta Was this translation helpful? Give feedback.
-
I'll do some testing on my end and tell you |
Beta Was this translation helpful? Give feedback.
-
Yeah, it works fine for anything that isn't Niri keybinds, at least on my machine. This is documented in Kando's Niri specific documentation, along with a workaround: If that isn't it, let me know! I'll gladly work towards a fix with you! |
Beta Was this translation helpful? Give feedback.
-
Oh but the question was why... |
Beta Was this translation helpful? Give feedback.
-
I'd have to dig through Smithay and Niri specific code. But I suppose that it handles its own keybinds by probably just straight up reading from the keyboard with a separate mecanism than the rest of the Wayland session |
Beta Was this translation helpful? Give feedback.
-
The relevant logic is in Niri source at |
Beta Was this translation helpful? Give feedback.
-
To explain what Kando does when it simulates a keypress: it uses the The problem is then probably due to how Niri handles those keybinds in |
Beta Was this translation helpful? Give feedback.
To explain what Kando does when it simulates a keypress: it uses the
zwp_virtual_keyboard_manager_v1
protocol to spawn a virtual keyboard to send keypresses from.The problem is then probably due to how Niri handles those keybinds in
src/ui/hotkey_overlay.rs
(in Niri source) since the keypresses are actually sent properly by Kando.