Update to the new winit keyboard API#6958
Conversation
|
That's a reference what we get when pressing |
ec05409 to
1d08a4c
Compare
|
This branch should sort of work now, except for macOS users given that |
18f4d4c to
a47e44d
Compare
|
As it was discussed on IRC, I've added transition from old winit keys into their modern counterparts. |
576e531 to
fdc15b3
Compare
5f58bb9 to
c1172a7
Compare
4d09303 to
fb17acc
Compare
94318da to
55bcb00
Compare
|
The one more question is what should we do with the We still have information whether a binding was from a numpad or not, but it could require config changes, such as adding an implicit field default to We could also drop support for old numpad keys in the config and solely rely on our new keys, that would require users to delete a few lines, but I don't think that's an issue. I'd prefer this variant btw. |
|
For what it's worth alacritty has seen config changes in the past that required users to make modifications to their config. @kchibisov could you give an example of a change that a user would need to make to replace the old numpad keys with the new keys in their config? |
|
@afh there's no difference between them and normal keys now. Unless you manually define special set of bindings just for numpad, which differ from regular keys there shouldn't be an issue. So all |
|
@perfbot (just testing stuff) |
|
Thanks for clarifying, @kchibisov. Personally I do not use NumPad keys specifically, yet I could see someone wanting to do that. Would it be possible and useful to introduce a For example: key_bindings:
{ key: Minus, mods: Numpad, action: DecreaseFontSize } |
|
It's just not clear how default bindings should work then, should we separately define numpad bindings or not, because it affects all the keys. What we get now from the winit is We could add implicit |
|
The numpad thing in the config should be resolved now. |
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.
Co-authored-by: Christian Duerr <contact@christianduerr.com>
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
Thank you so much for working on this, @kchibisov, and keep up the great work!! 🎉 I'm happy to see this merged and look forward to the next alacritty release (candidate) as it should resolve a long standing issue I had with alacritty on OpenBSD (see rust-windowing/winit#2032). |
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
VirtualKeydirectly in the bindingsfrom 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.