Sample Header Ad - 728x90

Karabiner Elements: How to bind "right_command + e" to open Emacs?

1 vote
0 answers
192 views
I've been trying to use Karabiner Elements to bind the "right_command + e" combination to open Emacs on my macOS. Here's the configuration snippet I originally used to bind the "left_command + e" combination:
{
    "description": "left_command + e -> Emacs",
    "manipulators": [
      {
        "from": {
          "key_code": "e",
          "modifiers": {
            "mandatory": [
              "left_command"
            ]
          }
        },
        "to": [
          {
            "shell_command": "open -a emacs"
          }
        ],
        "type": "basic"
      }
    ]
}
I attempted to modify the configuration based on a suggestion to simply change "left_command" to "right_command", like so:
{
    "description": "right_command + e -> Emacs",
    "manipulators": [
      {
        "from": {
          "key_code": "e",
          "modifiers": {
            "mandatory": [
              "right_command"
            ]
          }
        },
        "to": [
          {
            "shell_command": "open -a emacs"
          }
        ],
        "type": "basic"
      }
    ]
}
However, this modification didn't work as expected. Emacs is not being launched when I press right command and e. This is my whole config file for Karabiner elements. Also, I am using an American keyboard with Brazilian Portuguese input - if it matters. As a fellow user requested, this is my keyboard, a keychron k2. Note that I swapped the keys on the hardware to match my karabiner config. enter image description here Has anyone encountered a similar issue? Could you provide guidance on how to bind "right_command + e" to open Emacs using Karabiner Elements?
Asked by Pedro Delfino (325 rep)
Oct 26, 2023, 01:15 AM
Last activity: Oct 30, 2023, 05:36 PM