xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Changes between Initial Version and Version 1 of Ticket #2733, comment 5


Ignore:
Timestamp:
05/09/20 06:32:15 (13 months ago)
Author:
Antoine Martin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2733, comment 5

    initial v1  
    66We could use the [https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getasynckeystate GetAsyncKeyState] function to detect when we missed the release event, and synthesize one.
    77We also have to use [https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics GetSystemMetrics] because ''The `GetAsyncKeyState` function works with mouse buttons. However, it checks on the state of the physical mouse buttons, not on the logical mouse buttons that the physical buttons are mapped to. For example, the call `GetAsyncKeyState(VK_LBUTTON)` always returns the state of the left physical mouse button, regardless of whether it is mapped to the left or right logical mouse button. You can determine the system's current mapping of physical mouse buttons to logical mouse buttons by calling `GetSystemMetrics(SM_SWAPBUTTON)`.''
     8
     9
     10Then there's also bound to be some setups with weird input devices, where the value is going to always be unset, and we don't want to break those... so maybe only check the button state following a button press, and first ensure that the button state matches our initial expectations.