alacritty: Binding to "Grave" key stopped working
Just updated Alacritty here on macOS 10.13.4 and one of my critical keybindings stopped working.
This doesn’t work anymore:
https://github.com/bugeats/dotfiles/blob/master/src/config/alacritty/alacritty.yml#L200
But this does still work:
https://github.com/bugeats/dotfiles/blob/master/src/config/alacritty/alacritty.yml#L188
Both are configured to send the same character. My only guess is that Grave
is no longer identified.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 26 (16 by maintainers)
Commits related to this issue
- Update to winit-0.29.0-beta.0 The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as abitilty to... — committed to kchibisov/alacritty by kchibisov a year ago
- Update to winit-0.29.0-beta.0 The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as abitilty to... — committed to kchibisov/alacritty by kchibisov a year ago
- Update to winit-0.29.0-beta.0 The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as abitilty to... — committed to kchibisov/alacritty by kchibisov a year ago
- Update to winit-0.29.0-beta.0 The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as ability to ... — committed to kchibisov/alacritty by kchibisov a year ago
- Update to winit-0.29.0-beta.0 The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as ability to ... — committed to kchibisov/alacritty by kchibisov a year ago
- Update to winit-0.29.0-beta.0 The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as ability to ... — committed to kchibisov/alacritty by kchibisov a year ago
- Update to the new winit keyboard API The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as ab... — committed to alacritty/alacritty by kchibisov a year ago
Thanks for the clarification. I’ve updated the #1403 PR and removed this issue from the list of problems solved by it.
So, the reason that hack results in receiving a grave character is because of the
doCommandBySelector
handler, which is implemented to just return the characters associated with the most recent key down event. This was done so that Ctrl+C/etc. would generate characters, since those don’t triggerinsertText
and instead triggerdoCommandBySelector:noop
. Cmd+Grave also triggersdoCommandBySelector:noop
, but no otherNSTextInputClient
handlers.So, new more sophisticated hack idea:
WinitView
methods that placeKeyboardInput
events into a queueinsertText
ordoCommandBySelector
would reset the flag and queue; normally the queue is just discardeddoCommandBySelector
is triggered and the flag isn’t set, then the key events in the queue are sent to the user, instead of the regularReceivedCharacter
event generation behaviorI know I insinuated I didn’t want to work on this, but I’m unfortunately addicted to problem solving. I’ll try to implement this tomorrow.
@unphased the <C-Tab> issue was fixed in winit in https://github.com/tomaka/winit/pull/629, which should get into https://github.com/jwilm/alacritty/pull/1403, hopefully pretty soon
Here, I just threw one together: https://github.com/francesca64/alacritty/tree/macos-grave
Well, it’s messy, but it seems to work: https://github.com/francesca64/winit/tree/macos-grave
@bugeats let me know if this works for you. It would also be good if other people tested this, in case of regressions.
Not in my experience. Alacritty has a very raw keybinding experience on macOS and everything must be specified. I personally like it this way, and I’ve used it to my advantage. The Command + Grave combo is the system-wide convention for flipping between windows, scoped by application. In my case, I use it to navigate tmux sessions.