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
Binding to "Grave" key stopped working #1336
Comments
|
@bugeats you can run alacritty with |
When I press Command + A I see something like this in the events:
When I press Command + ` (Grave) I see this:
I appears to me that the Grave character is not even being sent/recognized. |
Input method: both native MacBook Pro keyboard, and external USB keyboard in US English. |
Given that Command + Grave is a system keybinding, I wonder if the underlying change to winit basically prevents that from being forwarded to the application. |
Is it really considered necessary for winit to handle system keybindings? I've put together a fun hack that makes this work again (https://github.com/francesca64/winit/tree/macos-grave) but it feels unclean. Besides that, it results in everyone getting a grave character when using the system shortcut. The reason this used to work was because winit's macOS keyboard handling was formerly quite naïve. Do other apps allow you to use this shortcut? |
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. |
Well, if someone comes up with a fix that doesn't cause issues elsewhere, I'll gladly merge it. |
So, the reason that hack results in receiving a grave character is because of the So, new more sophisticated hack idea:
I 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. |
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. |
is there a branch of Alacritty that uses your branch of macos-grave @francesca64 ? I'd be keen to test it |
Here, I just threw one together: https://github.com/francesca64/alacritty/tree/macos-grave |
Many thanks. I built your branch. Unfortunately it did not restore my formerly working bindings for next session and previous session in Tmux:
My other key bindings still work as ever so I'm sure the issue is with
All are by analogy with common mappings in Mac GUI apps. |
I've encountered this problem, with Cmd+Grave, but also with Ctrl+Tab. @francesca64 Do you think that is also plausibly caused by the same issue? I'll test the branch. Ctrl+Tab seems to do something similar to Cmd+Shift+]. And might be a macOS system bind. Update: branch fixes Grave but my Ctrl+Tab is still not getting passed in |
log from print events:
This is me focusing the window, pressing Ctrl, pressing and releasing A, pressing and releasing Tab, releasing Ctrl, and pressing Cmd (to focus to another window)... No ReceivedCharacter for the tab |
i think i'm seeing the same thing with ➤ cargo run -- --print-events | grep -v Awakened
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/alacritty --print-events`
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: Resized(610, 414) }
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: Moved(208, 611) }
[Unhandled CSI] action='l', args=[1005], intermediates=[63]
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: Focused(true) }
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 59, state: Released, virtual_keycode: Some(LControl), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 59, state: Released, virtual_keycode: Some(LControl), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 59, state: Released, virtual_keycode: Some(LControl), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 8, state: Pressed, virtual_keycode: Some(C), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(Id(140245736983792)), event: ReceivedCharacter('\u{3}') }
^C that's just hitting |
@unphased fyi I used bettertouchtool to work around the |
Did a bit of investigation here: rust-windowing/winit#625 I think this can be closed as wontfix. @bugeats I've had good results with remapping |
@unphased the issue was fixed in winit in rust-windowing/winit#629, which should get into #1403, hopefully pretty soon |
@sodiumjoe I tested #1403 (46316fc) and Grave bound on Cmd is still not working. It needs to be this specific key combo because this is how you switch windows in all mac apps. It did fix Ctrl+Tab being broken though. |
@unphased sorry i meant
|
Yes that would be the true solution. I will use a BetterTouchTool key bind hack to trigger my AppleScript which toggles the windows in the meantime! |
in any case i don't think |
Thanks for the clarification. I've updated the #1403 PR and removed this issue from the list of problems solved by it. |
Sorry to bring up this old issue, but I think I could be facing the same issue when trying to bind Here are my keybinds: - { key: Grave, mods: Control, chars: 'testtesttest' }
- { key: Grave, mods: Alt, chars: 'testtesttest' } |
To |
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 bind dead keys. It also fixes long standing issues with the virtual keycode bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal convertions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes alacritty#6842. Fixes alacritty#6455. Fixes alacritty#6184. Fixes alacritty#5684. Fixes alacritty#3574. Fixes alacritty#3460. Fixes alacritty#1336. Fixes alacritty#892. Fixes alacritty#458. Fixes alacritty#55.
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 bind dead keys. It also fixes long standing issues with the virtual keycode bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal convertions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes alacritty#6842. Fixes alacritty#6455. Fixes alacritty#6184. Fixes alacritty#5684. Fixes alacritty#3574. Fixes alacritty#3460. Fixes alacritty#1336. Fixes alacritty#892. Fixes alacritty#458. Fixes alacritty#55.
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 bind dead keys. It also fixes long standing issues with the virtual keycode bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal convertions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes alacritty#6842. Fixes alacritty#6455. Fixes alacritty#6184. Fixes alacritty#5684. Fixes alacritty#3574. Fixes alacritty#3460. Fixes alacritty#1336. Fixes alacritty#892. Fixes alacritty#458. Fixes alacritty#55.
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 bind dead keys. It also fixes long standing issues with the virtual key code bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal conversions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes alacritty#6842. Fixes alacritty#6455. Fixes alacritty#6184. Fixes alacritty#5684. Fixes alacritty#3574. Fixes alacritty#3460. Fixes alacritty#1336. Fixes alacritty#892. Fixes alacritty#458. Fixes alacritty#55.
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 bind dead keys. It also fixes long standing issues with the virtual key code bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal conversions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes alacritty#6842. Fixes alacritty#6455. Fixes alacritty#6184. Fixes alacritty#5684. Fixes alacritty#3574. Fixes alacritty#3460. Fixes alacritty#1336. Fixes alacritty#892. Fixes alacritty#458. Fixes alacritty#55.
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 bind dead keys. It also fixes long standing issues with the virtual key code bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal conversions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes alacritty#6842. Fixes alacritty#6455. Fixes alacritty#6184. Fixes alacritty#5684. Fixes alacritty#3574. Fixes alacritty#3460. Fixes alacritty#1336. Fixes alacritty#892. Fixes alacritty#458. Fixes alacritty#55.
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 bind dead keys. It also fixes long standing issues with the virtual key code bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal conversions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes #6842. Fixes #6455. Fixes #6184. Fixes #5684. Fixes #3574. Fixes #3460. Fixes #1336. Fixes #892. Fixes #458. Fixes #55.
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.The text was updated successfully, but these errors were encountered: