guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Jumper <>
Subject Re: keyboard does not take effect out of the div of display
Date Sat, 18 Jun 2016 05:26:58 GMT
On Wed, Jun 15, 2016 at 7:24 AM, 李小蛟 <> wrote:
> hello,


First, please be careful when sending email - I'm not sure what's
going on here, but you're using an absolutely enormous font... 36px is
pretty excessive. If you're unsure how to set this in your mail
client, I'd recommend switching to text-only mail.

I am responding in plain text mode to de-format this email and make
things readable again.

> here,i have a question .Just as the picture below:On the top,here is a
> display of vnc connection,and on the bottom of the display is a input .  So
> when i type in the input,all the keyboard input was sent into the display.
> it was not what i wanted.How could I do to solve this problem?

If you want to receive keyboard events generically across the window,
you will need to use the document object. Using something else will
mean that keyboard events will only occur when that object has focus,
which can be difficult to predict and may not work at all.

Instead, I would recommend continuing to use the document object, but
instead disable handling of the keyboard while your input fields have
focus. You can do this by:

1) Tracking focus with the "blur" and "focus" events provided by the browser.
2) Returning true within your onkeydown handler when you wish to allow
the events through to your input field.
3) Not calling sendKeyEvent() except when you want a key event to be
sent to the remote desktop server.


- Mike

View raw message