Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v15] Re-enable and fix sticky windows key (#38699)
* Bump the rust group with 2 updates (#37739) Bumps the rust group with 2 updates: [tokio](https://github.com/tokio-rs/tokio) and [time](https://github.com/time-rs/time). Updates `tokio` from 1.35.1 to 1.36.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-1.35.1...tokio-1.36.0) Updates `time` from 0.3.31 to 0.3.34 - [Release notes](https://github.com/time-rs/time/releases) - [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md) - [Commits](time-rs/time@v0.3.31...v0.3.34) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust - dependency-name: time dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Adds the extended keycode where appropriate and updates to the latest IronRDP master commit hash. (#37962) * Adds the extended keycode where appropriate and updates to the latest IronRDP master commit hash. * cleaning up disconnect result * Pipes disconnect messages through to the client. This required a change to the state management for DesktopSession. State is still quite complex to get right here, but this is a step in the right direction. * Updates desktopPlaybackHandle to the new authenticated websocket paradigm as it was forgotten in #37520 * prettier formatting * adding clarifying comments * Further refactoring to make DesktopSession's state machine more comprehensible * Remove unnecessary items from dependency lists * Fix sticky windows key (#38198) * Adds the extended keycode where appropriate and updates to the latest IronRDP master commit hash. * cleaning up disconnect result * Pipes disconnect messages through to the client. This required a change to the state management for DesktopSession. State is still quite complex to get right here, but this is a step in the right direction. * Updates desktopPlaybackHandle to the new authenticated websocket paradigm as it was forgotten in #37520 * prettier formatting * adding clarifying comments * Further refactoring to make DesktopSession's state machine more comprehensible * Remove unnecessary items from dependency lists * Adds the KeyboardHandler class that manages the keyboard events, including new functionality to handle withholding the Windows/Alt keys to prevent such keys from "sticking" when the user switches between windows. This technique works to stop the sticking, though there is still an edge case where the user cmd/alt-tabs super quickly, in a manner that the browser sees both the down and up events for the Windows key, despite the user's intention being to change windows. In the case of the Windows key, this causes the start menu to pop open, and the user must press the Windows key again to close it. This is not a showstopper, but it is a bit annoying. A similar problem would occur with the Alt key, where such behavior would cause the current window (on the Windows machine) to focus on the menu bar. The next commit will be to add a timeout mechanism for the relevant keyup events in order to mitigate this edge case. * Adds a delayUp cache for delaying the up event of the sticky windows key. This is to prevent the edge case where the user presses cmd/alt-tab really quickly in a manner that causes the down + up events to be registered in spite of the user's intention to be to change out of the window. * Refactoring KeyboardHandler * Convert caches into Maps * Moves the rest of keyboard functionality into KeyboardHandler, rearranges methods, adds an onUnmount for clearing all the intervals on unmount * Moves KeyboardHandler to its own file * simplifies withholding logic by including a Withholder class with a single array that manages all the withheld keystrokes * Makes useEffect symmetrical * Rename onUnmount to dispose * sp * Adds unit tests for Withholder * Splitting Withholder out into its own file * nits * CR * make fix-license --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information