1

I am in the process of setting up Karabiner to replace ControllerMate for an N52 Nostromo controller, which now shows up as the left-hand portion of a standard keyboard. I have a number of complex modification rules, all of which are using "frontmost_application_if", and "device_if" to limit scope. I have two rules that work on their own, but do not work when pressed together:

"from": { "key_code": "r" },"to": [ {"key_code": "left_shift", "repeat": true } ]
"from": { "key_code": "spacebar" }, "to": [ {"key_code": "left_alt" } ]

With 'R' held, I get 'shift', but once I also press 'spacebar', instead of getting 'alt', I get 'shift' and 'spacebar' I also tried setting a variable with the shift rule, and had a second 'alt-shift' rule that triggers on 'spacebar' + the variable, but it won't fire, and it seems like it has something do to with a modifier being held on repeat.

Can these be combined?

1 Answer 1

0

First, you do not need to write "repeat": true.
"repeat" is true by default and only can be changed to false (for 1 key / the last in a sequence).

Second, your two lines work together* if you append the "lazy" modifier as in:

"from": { "key_code": "r" },"to": [ {"key_code": "left_shift", "lazy": true } ]

Karabiner's documentation on "lazy" states:
The lazy modifier does not send own key events until another key is pressed together.

… which means that K.'s EventViewer will not display "r" or "left_shift" but only "left_alt".

(* They may have to be in the same "manipulators" but still work independently.)

1
  • thanks Clemsam - Just to close the loop here, and following the exchange on github: Lazy wasn't what I wanted, because "r"==>"Shift" and "space"==>"alt" need to work on their own. What ended up working was putting "modifiers":{"optional":["shift"]} on the space->alt rule and "modifiers":{"optional":["option"]} on the other rule.
    – Paul
    Nov 21, 2021 at 17:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .