I have caps and escape swapped through xkb_options, but that isn't reflected during use
Quite possibly upstream, just reporting here to do some basic checks if it's just not implemented/used
Seems to work fine in Alacritty so I'd be surprised if it's a problem in winit
This is related to https://github.com/Kethku/neovide/issues/27 I need to spend some time reading alacritty's source
Maybe related, maybe not: tilde doesn't work for me, just does nothing lol
I think it probably is. The solution I am using is not ideal. I basically list virtual key codes and map them manually. There has been some discussion that a better solution would be to use the receive char functionality in Winit, but that wouldn't support keys which don't produce a character. So I'm kinda stuck
Wezterm just abandoned Winit and rolled its own haha. Druid-shell is doing something similar
Maybe I'm overestimating how hard it is to just roll your own binds like that, but that seems like a ton of work
Its a tradeoff right. It looks like a lot, but its very understandable and ideally you build the list once and don't have to worry about it. The place I run into trouble is when my assumptions don't fit properly to all setups.
I just realized youre the core maintainer on alacritty! Maybe you can help me with your expertise with using Winit. Let me go into some more details about the problem.
The Neovim key input is very strange. Keybindings are sent to it as a string with the same format you use to map keybindings inside of vim. This has a couple of weird effects:
So I thiiink the correct strategy is to use the ReceivedCharacter event with a small set of transforms for characters which must be escaped, use KeyboardInput for remaining keys which do not produce values, and use ModifiersChanged to track modifiers and append to the previous event values.
This leads to caps:swapescape you were mentioning. I'm not sure how that interacts with KeyboardInput which is likely where it will fit in for my proposed rewrite.
Does this make sense to you? Do you have any relevant thoughts? I'd appreciate your expertise :)
Wait who are you referring to?
I made like one change to alacritty to allow for variable scroll sensitivity lol :P
jwilm is probably who you're thinking of
Ah youre right. :P I'm bad at internetting.
In that case I will close this and copy the summary to the main keyboard issue.
No worries, have been trying to figure out wayland/rust interop though (re https://github.com/szbergeron/simply-wayland-rs, https://github.com/szbergeron/rust_term) so will hopefully be able to help with that kind of stuff in the near future :)
I think wayland support has now landed in skulpin upstream so we may be good on that front now :)