-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement bitflag check for event key event flags. #21
Comments
EventFlags need to be a bitflag struct, and the varient const instance I think that should be ok and https://github.com/crossterm-rs/crossterm/blob/master/src/event/sys/windows/parse.rs#L143 can use contains to see if a flag is set The only probem I see is that https://github.com/crossterm-rs/crossterm/blob/master/src/event/sys/windows/parse.rs#L143 can now return a vector of events, how do you see handling this? |
Basicly the question is should https://github.com/crossterm-rs/crossterm/blob/master/src/event.rs#L349 also be a bitflag struct? If so this would make it easy to fix this issue |
Or a simpler thing is to make the kind field in mouse event a vector of mouseeventkind Also Im not sure if linux can benefit from this |
@TimonPost I just noticed the msdoc page that you linked is for winapi https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mouse_event I think the correct page is https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str#members which doesn't mention that it possible to combine values |
related: #20
According to windows documentation:
Currently, there are only checks to check against one particular case (see this file)
Ideally, we need to be able to detect all cases.
This also impacts: https://github.com/crossterm-rs/crossterm/blob/master/src/event/sys/windows/parse.rs#L143
And we need to find a way to handle it there as well.
The text was updated successfully, but these errors were encountered: