-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
[Winink] Check pointer button states. #94063
Conversation
Tested on Windows 10 with both Wacom table and Surface Pro 2017 with pen, this doesn't fix the issue. The exact behaviour depends on whether the "Allow my pen to act as mouse in legacy applications" option is enabled in Windows Settings. I tested with the following code: func _unhandled_input(event):
if event is InputEventScreenTouch:
prints("touch", event)
elif event is InputEventScreenDrag:
prints("touch", event)
elif event is InputEventMouse:
prints("mouse", event) If "Allow my pen to act as mouse in legacy applications" is off, this is the output (trimmed):
The above shows Godot receiving In the editor, this does make the tree nodes draggable, but code cannot be selected in the script editor. If "Allow my pen to act as mouse in legacy applications" is on, this is the output (trimmed):
The above shows the button press event being delayed until the pen was released. This might be the doing of In the editor, dragging doesn't work (obviously). (I don't mean to say that Godot should respect the "Allow my pen to act as mouse in legacy applications" setting -- I think Godot should handle pen events consistently, that is to not let |
Added |
Thanks for the update, but sadly there are still a few issues when testing with the GHA build:
Dragging nodes and tabs now work with pen, so at least that's part of the issue solved. (Though apparently it doesn't work with touchscreen input.) |
Probably, but why it would be an issue, system cursor is following pen input (or is there some mode where it is not)? |
Touchscreen should generate |
The default behaviour under Windows Ink is to allow each pointer to be operated separately. By default Windows does not move the cursor which represents the mouse (the one you get from There are cases when Windows does move the cursor, when an application does not handle WM_POINTER and/or WM_TOUCH messages. At least that's what I gathered 7 years ago. I don't think much has changed now but I may be wrong. |
This seems to be the case, but everything in Godot assumes there's a single pointer position for all devices (ant this is how it's handled on other OSes). |
Added double click simulation. For the rest, we'll probably need to support multiple pointer devices across the engine (input events have |
Okay, double click is fixed. Can we change |
Thanks! |
Should fix #93951 (apparently driver for my ancient Hunion table is no longer working on current version of Windows 11, so won't be able to test it until Friday).