Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key mappings using Alt don't work #3840

Open
daleconboy opened this issue Nov 27, 2021 · 0 comments
Open

Key mappings using Alt don't work #3840

daleconboy opened this issue Nov 27, 2021 · 0 comments

Comments

@daleconboy
Copy link

I tried applying some key mappings on a Mac for the Option key via the likes of <A-h> but the mappings aren't taking effect.

Looking at the logs when pressing the key combinations in question, it's reporting that alt = false , but altGr = true.

  • Machine: MacBook Pro 16-inch, 2019
  • OS: Monterey 12.0.1
  • Oni Version: 0.5.9-nightly (0.5.2198)

keybindings.js

[
  {
    "key": "<A-h>",
    "command": "window.moveLeft",
    "when": "normalMode"
  },
  {
    "key": "<A-l>",
    "command": "window.moveRight",
    "when": "normalMode"
  }
]

Oni Log output when pressing Opt-h

[INFO]  [609.252s] Oni2.Store.dispatch : dispatch: KeyDown {
  key =
  [(KeyPress.PhysicalKey
      { PhysicalKey.key = (Key.Character <opaque>);
        modifiers =
        { Modifiers.control = false; alt = false; altGr = true;
          shift = false; super = false }
        });
    (KeyPress.PhysicalKey
       { PhysicalKey.key = (Key.Character <opaque>);
         modifiers =
         { Modifiers.control = false; alt = false; altGr = false;
           shift = false; super = false }
         })
    ];
  scancode = 11; time = <opaque>}
[INFO]  [609.253s] Oni2.Store.dispatch : dispatch: (TextInput ("\203\153", <opaque>))
[DEBUG] [609.254s] Oni2.Store.dispatch : After: (TextInput ("\203\153", <opaque>))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant