Closed riotrah closed 10 months ago
My findings on this issue are that on my Windows 11 machine, the emoji picker does not work at all with kanata (llhook mechanism), while it works fine on Windows 10. I think it may be because of step 8., which seems to happen automatically (search is focused by default).
I'd be curious to know if kmonad has the same issue, since both use llhook keyboard injection, and this sounds like an issue at the OS side.
The issue below exists in PowerToys Keyboard Manager, which also uses SendInput and hook mechanisms to remap keys. Seems like it's a Windows issue.
Thank you for the feedback. I'm having the same problem with windows 11.
Apparently, the problem happens only with the search box. After selecting an emoji with the mouse, I can navigate using arrow keys, but not search for the emoji.
My findings on this issue are that on my Windows 11 machine, the emoji picker does not work at all with kanata (llhook mechanism), while it works fine on Windows 10. I think it may be because of step 8., which seems to happen automatically (search is focused by default).
I'd be curious to know if kmonad has the same issue, since both use llhook keyboard injection, and this sounds like an issue at the OS side.
I just tested, and the problem also happens using kmonad.
I was reading the related issue in the power toys project, and apparently, in their case, the keyboard still works, but not the configured mappings. Thus, I have an idea.
What do you think about trying to detect such cases where kanata can't handle the input because of the OS bug and suppress the program mapping just for those cases?
@jtroo Do you think it is feasible?
I was reading the related issue in the power toys project, and apparently, in their case, the keyboard still works, but not the configured mappings. Thus, I have an idea.
What do you think about trying to detect such cases where kanata can't handle the input because of the OS bug and suppress the program mapping just for those cases?
@jtroo Do you think it is feasible?
I don't know of any easy ways to detect that the key outputs are working properly, so for now we'll say it's infeasible to do automatically. One could do it manually though, by using the live reload prev/next actions to go between your normal config and a minimal one.
Thank you for the return and insight. Your idea worked. For instance, I will share a minimal configuration that others can use to cycle and use the emoji picker with kanata.
(defsrc
caps
)
(deflayer default
lrld-next
)
Describe the bug
Using my capslock/hyper-esque config with Kanata via the hook, invoking the Win11 emoji picker by any means (eg
Win
+;
) results in a mouse-accessible picker appearing, but one whose normal keyboard-based operations stop functioning if the focus is in the search input. Anything done to move the focus out of the search input onto any other UI element restores normal behavior until the search is focused again.Said input is the first thing focused upon appearance, and is always refocused when non-editing/navigational shortcuts (arrows, enter, escape, etc) are entered. This can make it appear as tho the kb inputs generally do not work, and not due to focus behavior. I actually realized this as I tried to add an ironic emoji to this bug report ha.
Version
1.0.7
Relevant kanata configs
config
```clojure ;; Comments are prefixed by double-semicolon. A single semicolon is parsed as the ;; keyboard key. Comments are ignored for the configuration file. ;; ;; This configuration language is Lisp-like. If you're unfamiliar with Lisp, ;; don't be alarmed. The maintainer jtroo is also unfamiliar with Lisp. You ;; don't need to know Lisp in-depth to be able to configure kanata. ;; ;; If you follow along with the examples, you should be fine. Kanata should ;; also hopefully have helpful error messages in case something goes wrong. ;; If you need help, you are welcome to ask. (defcfg ;; If you are using Windows, you do not need the linux-dev line below, but ;; you still need a defcfg entry. You can leave the linux-dev entry and it ;; will be ignored or you can delete it if desired. ;; ;; Your keyboard device may differ from this. I believe /dev/input/by-id/ ;; is preferable; I recall reading that it's less likely to change names on you, ;; but I didn't find any keyboard device in there in my VM. linux-dev /dev/input/by-path/platform-i8042-serio-0-event-kbd process-unmapped-keys yes ) ;; Only one defsrc is allowed. ;; ;; defsrc defines the keys that will be intercepted by kanata. The order of the ;; keys matches with deflayer declarations and all deflayer declarations must ;; have the same number of keys as defsrc. Any keys not listed in defsrc will ;; be passed straight to the operating system. (defsrc esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 grv 1 2 3 4 5 6 7 8 9 0 - = bspc tab q w e r t y u i o p [ ] \ caps a s d f g h j k l ; ' ret lsft z x c v b n m , . / rsft lctl lmet lalt spc ralt rmet rctl ) ;; The first layer defined is the layer that will be active by default when ;; kanata starts up. This layer is the standard QWERTY layout except for the ;; backtick/grave key (@grl) which is an alias for a tap-hold key. ;; ;; There are currently a maximum of 25 layers allowed. (deflayer qwerty esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 @grl 1 2 3 4 5 6 7 8 9 0 - = bspc tab q w e r t y u i o p [ ] \ @caps a s d f g h j k l ; ' ret lsft z x c v b n m , . / rsft lctl lmet lalt spc ralt rmet rctl ) ;; defalias is used to declare a shortcut for a more complicated action to keep ;; the deflayer declarations clean and aligned. The alignment in deflayers is not ;; necessary, but is strongly recommended for ease of understanding visually. ;; ;; Aliases are referred to by `@To reproduce
win+;
enter
immediately, which should insert whatever default/recently used emoji is prehighlightedescape
which should quit the pickerExpected behavior
It's all there above
Operating system
OS: Windows 11 Pro x86_64 Kernel: 10.0.22621
Additional context Add any other context about the problem here.