On Thu, Aug 16, 2018 at 8:31 PM Yi Sun <[email protected]> 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: https://github.com/apache/guacamole-client/blob/7d822df5a3b040bf61d1055fe7bffaf1996c0983/guacamole/src/main/webapp/app/client/controllers/clientController.js#L544-L547 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. -Nick >
