Closed ln613 closed 3 weeks ago
The setting works well on my machine, changes left_command+left_arrow to home. Is there a Complex Modifications rule defined above this one that is altering left_arrow?
I removed all other modifications, and it's still the same
{ "profiles": [ { "complex_modifications": { "rules": [ { "description": "F keys", "manipulators": [ { "from": { "key_code": "left_arrow", "modifiers": { "mandatory": ["left_command"] } }, "to": [{ "key_code": "home" }], "type": "basic" } ] } ] }, "name": "Default profile", "selected": true, "virtual_hid_keyboard": { "keyboard_type_v2": "ansi" } } ] }
When I press left_command + left_arrow in event viewer, I got left_command + home
It's home.
The EventViewer shows flags when left_command + home is pressed.
you are right, it is home. but sent after a left_command DOWN is send, followed by the home UP and left_command UP. So it's equivalent to pressing home and left_command separately.
It won't cause any problem on Mac since pressing left_command alone doesn't do anything, but when I use it inside a Remote Desktop app running windows, the command button becomes the WIN button in windows, which will open the task bar when the left_command UP is finally sent.
Is there a way to prevent the left_command UP being sent after a modification happened?
There are a few ways to do this, the easiest is to change left_command itself to a lazy modifier. https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to/lazy/
Another option is to use simultaneous so that it only triggers home when keys are pressed at the same time. https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/from/simultaneous/
The documentation says:
"Mandatory modifiers are removed from to events."
However, it doesn't seem to be the case, if I do sth like this
... "from": { "key_code": "left_arrow", "modifiers": { "mandatory": ["left_command"] } }, "to": [{ "key_code": "home" }], ...
It will be changed to "left_command + home", the modifiers are kept. How do I remove the Mandatory modifiers?