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
Add KeyboardModifiers
to PointerEvent
/ Add PointerEvent
to clicked
closure
#2686
Comments
wspl
changed the title
Add KeyboardModifiers to PointerEvent / Add PointerEvent to clicked closure
Add May 4, 2023
KeyboardModifiers
to PointerEvent
/ Add PointerEvent
to clicked
closure
Yes, we should have a way to detect the keyboard modifier. This was also discussed in #1280 As a workaround for now, see the example in #2641 (comment) |
(this was asked for again in #3043 ) |
ogoffart
added a commit
that referenced
this issue
Jul 5, 2023
ogoffart
added a commit
that referenced
this issue
Jul 5, 2023
ogoffart
added a commit
that referenced
this issue
Jul 6, 2023
* Add modifiers to PointerEvent Closes #2686
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm creating a List with a multiple selection feature. I need to detect whether the user pressed
Shift
orControl
when clicking, in order to decide which selection operation to perform.I tried wrapping my window with
FocusScope
to capture keyboard events. However, it is behaving strangely: It doesn't get focused when I click a list item directly. I need to click the blank area of the window to make it focus, which then allowsFocusScope
to capture the keys.I think a better approach to make it work would be to add
KeyboardModifiers
toPointerEvent
. And then expose thePointerEvent
struct to theclicked
closure. (Thepointer-event
closure is unstable too, it doesn't triggered in many situaion. Perhaps I will open a new issue to describe this problem.)The text was updated successfully, but these errors were encountered: