You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arguably, the whole idea of ModifiersChanged is a bit dubious IMO, the only reason you want the modifier state is to act differently when handling other events IIUC?
Assuming users handle events inside window_event, I actually think it'd be sufficient to have Window::modifiers? (If users queue events for later handling, they'll have to query Window::modifiers in window_event, accessing Window::modifiers at a later point would return new modifiers).
Tracing it back to #1124, I don't see a discussion about instead adding Window::modifiers.
Reading Alacritty's code, they seem to handle ModifiersChanged by updating the cursor icon for example, that might actually be a good enough use-case that it's worth keeping.
Another one would if you are using shift with scrolling to scroll horizontally. If you press it out of focus of the window then hover the window and scroll. In this case you wanna scroll horizontally, but not vertically
Activity
Murmele commentedon Mar 17, 2026
Thanks for the creation! The usecase would be that the modifiers can be tracked when the modifier was pressed and the window gets the focus
madsmtm commentedon Mar 17, 2026
Arguably, the whole idea of
ModifiersChangedis a bit dubious IMO, the only reason you want the modifier state is to act differently when handling other events IIUC?Assuming users handle events inside
window_event, I actually think it'd be sufficient to haveWindow::modifiers? (If users queue events for later handling, they'll have to queryWindow::modifiersinwindow_event, accessingWindow::modifiersat a later point would return new modifiers).Tracing it back to #1124, I don't see a discussion about instead adding
Window::modifiers.madsmtm commentedon Mar 17, 2026
Reading Alacritty's code, they seem to handle
ModifiersChangedby updating the cursor icon for example, that might actually be a good enough use-case that it's worth keeping.Murmele commentedon Mar 18, 2026
Another one would if you are using
shiftwith scrolling to scroll horizontally. If you press it out of focus of the window then hover the window and scroll. In this case you wanna scroll horizontally, but not vertically