On Tue, Oct 3, 2017 at 3:00 PM, McRoy, Jeffrey (GE Healthcare) < jeffrey.mc...@ge.com> wrote:
> ... Would Guacamole have a way to programmatically inject commands into > the input stream? > > It's important to distinguish between commands and input events here. In general, yes, you can inject input events into the stream. Assuming you're building your own web application driven by the Guacamole API, there is an API at the JavaScript level which facilitates this [1], and you can leverage that to send a sequence of key press/release events to replicate what a user would type. The concept of a "command" doesn't exist at the Guacamole level, though. There's no way that Guacamole would be able to know that the keystrokes being sent are not actually being sent in the middle of a command that the user already partially typed, or that they're actually being handled by a text editor and not the shell, etc. You would also need to take into account the current keyboard state (what if the user is holding down Ctrl? or Shift?), and maybe even reset the keyboard entirely prior to sending any events [2]. - Mike [1] http://guacamole.incubator.apache.org/doc/guacamole-common-js/Guacamole.Client.html#sendKeyEvent [2] http://guacamole.incubator.apache.org/doc/guacamole-common-js/Guacamole.Keyboard.html#reset