-
Notifications
You must be signed in to change notification settings - Fork 912
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
Separate modifier for RAlt #756
Comments
#753 Is also related to left and right versions of keyboard buttons. |
On German keyboards, can |
I just tested it, and it looks like German keyboards indeed do not treat |
@Osspial I didn't even think of that, but I think this should solve the problem too. As long as the This would be a breaking change though, just to make sure the version number is bumped appropriately. |
@chrisduerr I'll look into what it takes to do this on Windows. Unfortunately, the Windows API doesn't seem to provide a clean solution to this, but Firefox handles it properly and I can look to see what their source code is doing. As for this being a breaking change - this seems more like a bugfix to me, seeing that the |
@francesca64 Would you be able to investigate this on MacOS? |
@Osspial yes, though probably not for a few days. |
As a regular user of Alacritty I would like to express my gratitude. |
@francesca64, I know you're doing this in your free time and I'm grateful but I've to ask if there's any news on this? This issue is currently preventing me from using Alacritty on Windows (its my main terminal on Linux) and other than not being able to input "@" its already sooo much better than other terminals. |
@niklas88 no news. It would be better for someone else to look into it. |
Long resolved. |
I've been trying to troubleshoot this Alacritty issue and have noticed that when RAlt (or commonly also AltGr) is pressed, that the alt modifier is set as active in the winit events.
In the context of a terminal emulator this is problematic though, since the "normal" Alt key is used to send special escape sequences. As far as I know, the RAlt or AltGr key is mainly used for unlocking additional characters on conventional keyboards, so it's often already handled by the
ReceivedCharacter
event.As a solution to this issue, it would be nice if the
ModifiersState
could differentiate between the normal and the right alt key. This would make it straight-forward to know if the key can be ignored since it's handled byReceivedCharacter
, or if additional escapes need to be sent.Now it should be mentioned that it would be possible to work around this by tracking the
LAlt
key and stetting/unsetting the key as hold whenever it's presessed/released. However since the modifiers struct seems to be made to get information about the current modifiers and others might run into similar issues, it might be worth expanding it? Though I can see how keeping the modifiers simple would also be an advantage, so maybe this should be treated as a special case that needs to be handled in Alacritty.Regarding the actual implementation, this would be a breaking change if the
alt
modifier is not sent anymore andaltgr
orlalt
would be sent instead. It would also be breaking if a separate enum/struct for the alt modifier would be introduced. One approach for adding this in a backwards-compatible way would be to add thealtgr
orlalt
modifier, but always sendingalt
too, if it is pressed. If this is a desired feature I'd love to help out myself, though the approach should be determined first.The text was updated successfully, but these errors were encountered: