0

I'm using neovim to edit code and am needing to create a mapping in which I press the left command key, and neovim (or at least my alacritty terminal) thinks that I am pressing the left control key.

I of course would love for neovim to be able to recognize the command key on mac but I can't seem to find any way to do this.

I have tried writing a karabiner-elements rule that applies only when editing in neovim without any success.

Would someone be able to show me the correct way to write an application-specific keybinding in karabiner elements that only functions in neovim? Or if there is any way in which I may use the command key natively in neovim?

  • macOS: Catalina 10.15.7

  • Terminal: Alacritty@latest

  • neovim: v0.4.4

  • karabiner-elements-@latest

7
0

Unfortunately you didn't post WHAT exactly you wrote in your Karabiner-elements rule. Here is what normally works for specific apps:

There comes an app EventViewer with Karabiner-Elements that in its tab "Frontmost application" shows information on any active applications.
E.g., it might return "com.apple.TextEdit" and you would write in Karabiner:

{   "conditions": [
   {
      "bundle_identifiers": [
          "^com.apple.TextEdit" ],
      "type": "frontmost_application_if"
   }             ]

(Notice the ^ -character.) If you haven't tried it this way it might help.

You must log in to answer this question.

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