Skip to content

GUACAMOLE-2207: Add support for Cmd(Meta)-based click modifiers#1155

Open
sschiffli wants to merge 1 commit intoapache:staging/1.6.1from
sschiffli:GUACAMOLE-2207-cmd-click
Open

GUACAMOLE-2207: Add support for Cmd(Meta)-based click modifiers#1155
sschiffli wants to merge 1 commit intoapache:staging/1.6.1from
sschiffli:GUACAMOLE-2207-cmd-click

Conversation

@sschiffli
Copy link
Contributor

Forward guacClientMouseDown events from the Mouse module to the Keyboard module via a new handleMouseEvent() method. When a mouse click occurs with the Meta modifier pressed and there's a pending Meta keydown event, the mouse event is added to the keyboard event log to provide the context needed to resolve the deferred Meta key. This enables the Meta key to be sent before the mouse click, properly delivering Cmd+Click to the backend.

@sschiffli sschiffli marked this pull request as draft January 30, 2026 14:29
@sschiffli sschiffli force-pushed the GUACAMOLE-2207-cmd-click branch from 8251d0b to 43e6214 Compare January 30, 2026 17:44
// never be sent in Chrome (bug #108404). Modifier keys are excluded
// from this workaround as they have reliable keyup events and need
// to be held down simultaneously with Meta.
if (this.modifiers.meta && !isModifierKey(this.keysym))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see an argument where this should be a separate issue, as this is needed to support CMD+Shift+Click (not CMD+Click), so let me know what you think or if a rewording of the JIRA/PR would be sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine in here. You can reword the Jira issue if you want to make it more clear that it's working to support both Shift+CMD an Cmd, but no major concerns from me.

@sschiffli sschiffli force-pushed the GUACAMOLE-2207-cmd-click branch from 43e6214 to c71339f Compare January 30, 2026 21:36
@sschiffli sschiffli changed the title GUACAMOLE-2207: Add support for CMD+Click GUACAMOLE-2207: Add support for Cmd(Meta)-based click modifiers Jan 30, 2026
@sschiffli sschiffli marked this pull request as ready for review January 30, 2026 21:36
keyboard.listenTo(sink.getElement());

// Resolve deferred Meta key events on mouse click to enable Cmd+Click
$scope.$on('guacBeforeClientMouseDown', function(event, mouseEvent, client) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will unused argument (client) cause lint errors?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants