Skip to content

Fix Alt+Click in desktop sessions#57637

Merged
danielashare merged 1 commit intomasterfrom
danielashare/alt-click-fix
Aug 11, 2025
Merged

Fix Alt+Click in desktop sessions#57637
danielashare merged 1 commit intomasterfrom
danielashare/alt-click-fix

Conversation

@danielashare
Copy link
Copy Markdown
Contributor

This PR fixes #50725, where a user couldn't Alt+Click.

This was being blocked by the Withholder class that withholds the Alt key until another key is pressed to avoid stuck keys. To fix this issue, I modified Withholder to also handle mouse events so that when a click is registered it flushes any held keys to the remote desktop.

Before:
Notice that after finish selecting each line and release Alt, the VSCode menu items at the top left are underlined showing that Alt is only sent to the client after I release it.
https://github.com/user-attachments/assets/873e31b8-07e5-4fde-8285-c9149c4cb384

After:
I start holding Alt after selecting the first line, but it isn't sent to the remote desktop until I click on the second line. This shows that Withholder logic is maintained until another event comes in.
https://github.com/user-attachments/assets/5fbd091f-044d-43a1-8867-bc046da09931

changelog: Fix Alt+Click not being registered in remote desktop sessions.

Comment thread web/packages/shared/components/DesktopSession/Withholder.tsx Outdated
Comment thread web/packages/shared/components/DesktopSession/Withholder.tsx Outdated
@danielashare danielashare force-pushed the danielashare/alt-click-fix branch from 62abc42 to 7ac7b0c Compare August 11, 2025 12:55
@danielashare danielashare force-pushed the danielashare/alt-click-fix branch from 7ac7b0c to a08d77e Compare August 11, 2025 13:15
@danielashare danielashare added this pull request to the merge queue Aug 11, 2025
Merged via the queue into master with commit 4491241 Aug 11, 2025
40 checks passed
@danielashare danielashare deleted the danielashare/alt-click-fix branch August 11, 2025 13:55
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@danielashare See the table below for backport results.

Branch Result
branch/v16 Create PR
branch/v17 Create PR
branch/v18 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alt key shortcut handling issue with Windows Desktop Access

3 participants