guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Couchman <>
Subject Re: programmatically open guacamole menu
Date Fri, 17 Aug 2018 00:54:53 GMT
On Thu, Aug 16, 2018 at 8:31 PM Yi Sun <> wrote:

> Thanks for the help, Nick, at this time I'm still exploring guacamole.js
> and Keyboard.js to see how to send ctrl+shif+alt event to Guacamole.
> In my code I just tried to create an Guacamole.Keyboard and set
> modifierstate but that does not work for me..
> var state =new Guacamole.Keyboard.ModifierState();
> kb.modifiers.alt=true;
> kb.modifiers.ctrl=true;
> kb.modifiers.shift=true;

I don't think that setting this will actually make the JavaScript
application recognize a keypress.  This would more likely send those
modifiers through to the client, but not actually trigger it.

However, if you're trying to create a button to trigger the menu, I
wouldn't worry about emulating the Ctrl-Alt-Shift keypress - you should be
able to create a method that opens the menu similar to the one that does it
when those keys are pressed.  If you look at the clientController.js file
around these lines:

You'll see the code block that is called when the client controller detects
the Ctrl-Shift-Alt key-combo - you should be able to create a method that
can be called by your button that does something similar to this.



View raw message