Karabiner-Elements: [Bug] Unable to remap 'consumer_key_code' buttons

I am using this configuration:

{
    "title": "FaceTime fix",
    "rules": [{
        "manipulators": [{
            "type": "basic",
            "description": "Prevent FaceTime call from ending when using the play/pause key",
            "from": {
                "consumer_key_code": "play_or_pause"
            },
            "to": [{
                "key_code": "tab",
                "modifiers": [
                    "left_command"
                ]
            }, {
                "consumer_key_code": "play_or_pause"
            }],
            "conditions": [{
                "bundle_identifiers": [
                    "com.apple.FaceTime"
                ],
                "type": "frontmost_application_if"
            }]
        }]
    }]
}

which doesn’t work.

Changing

            "from": {
-                "consumer_key_code": "play_or_pause"
+                "key_code": "tab"
            },

to test the rest of the configuration, works.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (8 by maintainers)

Most upvoted comments

Karabiner maps function keys to media controls after all other modifications (see this). That’s why you can’t use consumer_key_code in from section. Because of this, the only way to remap them is by handling media keys completely from complex modifications (i.e. handle fn + function keys and add a variable that will replace Use all F1, F2, etc. keys as standard function keys toggle).

Although this is probably a deliberate design decision, this feels like a bug and should be changed, because it makes a lot of useful modifications impossible without writing convoluted complex modifications for media keys handling.

As a workaround (joke), you can stop using FaceTime, like I did 😂

This looks like a bug. I tried and was unable to map consumer_key_code buttons. You should change the title to reflect this is a Karabiner bug, something like [Bug] Unable to remap 'consumer_key_code' buttons.


Btw, won’t audios get paused/muted when you are calling?