-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behaviour in the presence of OS-level remapping is inconsistent in Windows-LLHOOK #152
Comments
Thanks for the kind words 🙂. Summary
Yes I believe this is the correct interpretation and it's somewhat by design. More detailI haven't tested your exact setup, but here's what's going on. There are two different types of mechanism that software like kanata can use to remap keys.
The mechanism kanata uses on Linux is in the OS kernel (/dev/input and /dev/uinput) whereas on Windows by default it's in OS userland (WH_KEYBOARD_LL). Aside: the Interception driver on Windows uses a kernel mechanism. That kanata on Linux uses the kernel mechanism is actually a good thing because there's less weirdness in kanata's behavior on Linux. The consequence of this for Linux is that any X11 level remapping e.g. xmodmap will be done after all of kanata's processing; kanata will operate on the actual physical keys being sent in, and then xmodmap remaps the outputs. This is in contrast to the Windows WH_KEYBOARD_LL mechanism which will trigger after Windows has already mapped keys to Colemak-DH. Two possible workarounds are:
The problem is actually more on the Windows side than the Linux side because Windows doesn't have a good kernel-level mechanism for kanata to make use of. I've entertained the idea of writing my own Interception-like kernel keyboard driver for Windows but haven't bit the bullet yet. |
Thank you for the detailed answer! I actually thought about doing the Colemak-DH mapping in Kanata entirely. When first starting with Colemak I found Kanata to be the best approach, as I was already using it for home row mods. However I did run into issues when configuring.
I will fiddle around some more hoping to find a solution to these problems. As said above it would be great to just rely on Kanata when it comes to Colemak. Really enjoy Kanata on both windows and Linux and it's already become a big part of my workflow in general. |
I'm not sure I understood your issue. I'm Brazilian using ABNT2 Keyboard (Brazilian qwerty). I keep my system configured as ABNT2 qwerty. But in Kanata configuration file I need to use the I use:
This way I use Colemak-DH but the system still thinks it's the default Brazilian ABNT2 qwerty. The |
I've set up kanata similar to @br-lemes. System is now set to US international. This gives me access to æøå using AltGr combinations and unlike norwegian qwerty, mappings of special characters are the same as colemak. Ex (multi ralt w) in kanata is å. Only issue with this approach is that some windows applications does not like (multi ralt w). So far I have issues in VcXsrv and Outlook. I'm not sure, but this may be related to the explanation here. |
I would suggest (and use myself) tap-hold-diacrit like It's more intuitive than learning the random US international shortcuts |
I've been using kanata for a while and it has always served me well, but after changing layout to colemak-dh I've run into some issues setting up home row mods. It seems that kanata still interprets keys in qwerty despite changing layout. This is a tough one to explain so bear with me.
I type on a qwerty keyboard (physically), but my layout is set to
VC Keymap: us
X11 Layout: us
X11 Model: pc105
X11 Variant: colemak_dh
X11 Options: ctrl:nocaps
Here is a small example config
I now can type in colemak but home row mods are not working correctly. For example the colemak n key which is placed at the qwerty j wont trigger shift when hold. Instead the qwerty n key, which is the colemak k key triggers shift. Here is the log when starting kanata and pressing colemak n
I was surprised to find this as it seems to work correctly in windows. Could it be that kanata is interfering with how linux (sway and wayland btw) is translating between qwerty / colemak?
Sorry for the somehow vague bug description, and thank you for your work on this project.
The text was updated successfully, but these errors were encountered: