You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Anthony Moon <an...@moving-picture.com> on 2017/10/31 17:30:38 UTC

Capture keyboard input?

Hi all,

Just wondering if Gauc has the ability to capture all keyboard input? I can't tell you how many times I've accidentally closed the whole tab while typing (CTRL + W)..

Please let me know if this is a possibility, thanks!

Anthony Moon, Senior System Administrator
MPC Film
T +1 604 689 1081 | C +1 604 329 0174
London - Vancouver - LA - Bangalore - Montréal
moving-picture.com/film<http://moving-picture.com/film>


RE: Capture keyboard input?

Posted by Anthony Moon <an...@moving-picture.com>.
Thanks for the information, everyone. I will try out a few different browser configurations. 

-----Original Message-----
From: Ryan Underwood [mailto:ryan@greymarketlabs.com] 
Sent: Monday, November 06, 2017 10:28 AM
To: user@guacamole.incubator.apache.org
Subject: RE: Capture keyboard input?

** WARNING: This mail is from an external source **


I forgot about the OS and Browser eating keys before you get them.  With most browsers you can stop your browser from responding to those OR pop up a warning so it doesn't just happen without confirmation.
Regards,
-Ryan

-----Original Message-----
From: Mike Jumper [mailto:mike.jumper@guac-dev.org]
Sent: Monday, November 06, 2017 1:23 PM
To: user@guacamole.incubator.apache.org
Subject: Re: Capture keyboard input?

On Tue, Oct 31, 2017 at 10:30 AM, Anthony Moon <an...@moving-picture.com> wrote:
> Hi all,
>
> Just wondering if Gauc has the ability to capture all keyboard input?
> I can’t tell you how many times I’ve accidentally closed the whole tab 
> while typing (CTRL + W)..
>

Guacamole already attempts to capture absolutely all keyboard input.
It's up to the OS and the browser to decide which key events to actually expose to JavaScript. Keyboard events for shortcuts reserved by the OS (Ctrl+Alt+Del, Alt+Tab, etc.) are typically eaten by the OS before they reach the browser, and keyboard events for shortcuts reserved by the browser (such as Ctrl+W) are typically eaten by the browser before they reach JavaScript.

Some browsers, Chrome included, will allow bookmarks to be saved to the desktop or home screen, and give the webapps bookmarked in such a manner access to additional keystrokes. If the browser you're using has this feature, that may help things. Beyond that, it's a security feature of the browser that web applications cannot take full control of the keyboard, and there's nothing that can be done within JavaScript to alter this. As long as the key event actually happens within JavaScript, Guacamole will handle it and pass it along to the remote desktop.

- Mike

RE: Capture keyboard input?

Posted by Ryan Underwood <ry...@greymarketlabs.com>.
I forgot about the OS and Browser eating keys before you get them.  With most browsers you can stop your browser from responding to those OR pop up a warning so it doesn't just happen without confirmation.
Regards,
-Ryan

-----Original Message-----
From: Mike Jumper [mailto:mike.jumper@guac-dev.org] 
Sent: Monday, November 06, 2017 1:23 PM
To: user@guacamole.incubator.apache.org
Subject: Re: Capture keyboard input?

On Tue, Oct 31, 2017 at 10:30 AM, Anthony Moon <an...@moving-picture.com> wrote:
> Hi all,
>
> Just wondering if Gauc has the ability to capture all keyboard input? 
> I can’t tell you how many times I’ve accidentally closed the whole tab 
> while typing (CTRL + W)..
>

Guacamole already attempts to capture absolutely all keyboard input.
It's up to the OS and the browser to decide which key events to actually expose to JavaScript. Keyboard events for shortcuts reserved by the OS (Ctrl+Alt+Del, Alt+Tab, etc.) are typically eaten by the OS before they reach the browser, and keyboard events for shortcuts reserved by the browser (such as Ctrl+W) are typically eaten by the browser before they reach JavaScript.

Some browsers, Chrome included, will allow bookmarks to be saved to the desktop or home screen, and give the webapps bookmarked in such a manner access to additional keystrokes. If the browser you're using has this feature, that may help things. Beyond that, it's a security feature of the browser that web applications cannot take full control of the keyboard, and there's nothing that can be done within JavaScript to alter this. As long as the key event actually happens within JavaScript, Guacamole will handle it and pass it along to the remote desktop.

- Mike

Re: Capture keyboard input?

Posted by Mike Jumper <mi...@guac-dev.org>.
On Tue, Oct 31, 2017 at 10:30 AM, Anthony Moon
<an...@moving-picture.com> wrote:
> Hi all,
>
> Just wondering if Gauc has the ability to capture all keyboard input? I
> can’t tell you how many times I’ve accidentally closed the whole tab while
> typing (CTRL + W)..
>

Guacamole already attempts to capture absolutely all keyboard input.
It's up to the OS and the browser to decide which key events to
actually expose to JavaScript. Keyboard events for shortcuts reserved
by the OS (Ctrl+Alt+Del, Alt+Tab, etc.) are typically eaten by the OS
before they reach the browser, and keyboard events for shortcuts
reserved by the browser (such as Ctrl+W) are typically eaten by the
browser before they reach JavaScript.

Some browsers, Chrome included, will allow bookmarks to be saved to
the desktop or home screen, and give the webapps bookmarked in such a
manner access to additional keystrokes. If the browser you're using
has this feature, that may help things. Beyond that, it's a security
feature of the browser that web applications cannot take full control
of the keyboard, and there's nothing that can be done within
JavaScript to alter this. As long as the key event actually happens
within JavaScript, Guacamole will handle it and pass it along to the
remote desktop.

- Mike

RE: Capture keyboard input?

Posted by Ryan Underwood <ry...@greymarketlabs.com>.
Ah, I misunderstood and that makes sense since you mentioned closing windows... So you want to "ignore" a key or key combination? I don't think it's built-in but I would start with the JS libraries. Between guacKey.js and Keyboard.js you can probably add a bit of code to ignore keys/key combos you want ignored. Sorry if I'm still misunderstanding what you're asking for. AFAIK, there's no Guacamole UI for configuring keys or key combos you want to ignore; for that I would defer to the experts.
Regards,
-Ryan

From: Anthony Moon [mailto:anthony-m@moving-picture.com]
Sent: Monday, November 06, 2017 12:51 PM
To: user@guacamole.incubator.apache.org
Subject: RE: Capture keyboard input?

Hi Ryan,

I am not looking to log keyboard events, I'd like to find a way for keyboard hot keys/combos to be 'captured' within the active session and not interrupted by the client OS (things like CTRL + ALT + DEL or CTRL + W).

Do you know if this is possible or shall I submit a feature request?

From: Ryan Underwood [mailto:ryan@greymarketlabs.com]
Sent: Monday, November 06, 2017 9:49 AM
To: user@guacamole.incubator.apache.org<ma...@guacamole.incubator.apache.org>
Subject: RE: Capture keyboard input?

** WARNING: This mail is from an external source **

There's a key handler function in guacd (user-handler.c). You'd have to implement your own handler/function to do something like logging.
-Ryan

Sent from my Android phone using TouchDown (www.symantec.com<http://www.symantec.com>)

-----Original Message-----
From: Anthony Moon [anthony-m@moving-picture.com]
Received: Monday, 06 Nov 2017, 12:45PM
To: user@guacamole.incubator.apache.org<ma...@guacamole.incubator.apache.org> [user@guacamole.incubator.apache.org]
Subject: RE: Capture keyboard input?
Just gonna give this a bump..

From: Anthony Moon [mailto:anthony-m@moving-picture.com]
Sent: Tuesday, October 31, 2017 10:31 AM
To: user@guacamole.incubator.apache.org<ma...@guacamole.incubator.apache.org>
Subject: Capture keyboard input?

Hi all,

Just wondering if Gauc has the ability to capture all keyboard input? I can't tell you how many times I've accidentally closed the whole tab while typing (CTRL + W)..

Please let me know if this is a possibility, thanks!

Anthony Moon, Senior System Administrator
MPC Film
T +1 604 689 1081 | C +1 604 329 0174
London - Vancouver - LA - Bangalore - Montréal
moving-picture.com/film<http://moving-picture.com/film>


Re: Capture keyboard input?

Posted by Nick Couchman <vn...@apache.org>.
On Mon, Nov 6, 2017 at 12:50 PM, Anthony Moon <an...@moving-picture.com>
wrote:

> Hi Ryan,
>
>
>
> I am not looking to log keyboard events, I’d like to find a way for
> keyboard hot keys/combos to be ‘captured’ within the active session and not
> interrupted by the client OS (things like CTRL + ALT + DEL or CTRL + W).
>
>
>
> Do you know if this is possible or shall I submit a feature request?
>
>
>
Anthony,
Yes, this is possible, but not by any sort of existing configuration -
you'd have to modify the source code of Guacamole to capture the specific
key strokes you're interested in.  The Guacamole client uses this with CTRL
+ SHIFT + ALT to display the user menu on the left-hand side of the page
while you're connected.

Regards,
Nick

RE: Capture keyboard input?

Posted by Anthony Moon <an...@moving-picture.com>.
Hi Ryan,

I am not looking to log keyboard events, I'd like to find a way for keyboard hot keys/combos to be 'captured' within the active session and not interrupted by the client OS (things like CTRL + ALT + DEL or CTRL + W).

Do you know if this is possible or shall I submit a feature request?

From: Ryan Underwood [mailto:ryan@greymarketlabs.com]
Sent: Monday, November 06, 2017 9:49 AM
To: user@guacamole.incubator.apache.org
Subject: RE: Capture keyboard input?

** WARNING: This mail is from an external source **

There's a key handler function in guacd (user-handler.c). You'd have to implement your own handler/function to do something like logging.
-Ryan

Sent from my Android phone using TouchDown (www.symantec.com<http://www.symantec.com>)

-----Original Message-----
From: Anthony Moon [anthony-m@moving-picture.com]
Received: Monday, 06 Nov 2017, 12:45PM
To: user@guacamole.incubator.apache.org<ma...@guacamole.incubator.apache.org> [user@guacamole.incubator.apache.org]
Subject: RE: Capture keyboard input?
Just gonna give this a bump..

From: Anthony Moon [mailto:anthony-m@moving-picture.com]
Sent: Tuesday, October 31, 2017 10:31 AM
To: user@guacamole.incubator.apache.org<ma...@guacamole.incubator.apache.org>
Subject: Capture keyboard input?

Hi all,

Just wondering if Gauc has the ability to capture all keyboard input? I can't tell you how many times I've accidentally closed the whole tab while typing (CTRL + W)..

Please let me know if this is a possibility, thanks!

Anthony Moon, Senior System Administrator
MPC Film
T +1 604 689 1081 | C +1 604 329 0174
London - Vancouver - LA - Bangalore - Montréal
moving-picture.com/film<http://moving-picture.com/film>


RE: Capture keyboard input?

Posted by Ryan Underwood <ry...@greymarketlabs.com>.
There's a key handler function in guacd (user-handler.c). You'd have to implement your own handler/function to do something like logging.
-Ryan

Sent from my Android phone using TouchDown (www.symantec.com)

-----Original Message-----
From: Anthony Moon [anthony-m@moving-picture.com]
Received: Monday, 06 Nov 2017, 12:45PM
To: user@guacamole.incubator.apache.org [user@guacamole.incubator.apache.org]
Subject: RE: Capture keyboard input?

Just gonna give this a bump..

From: Anthony Moon [mailto:anthony-m@moving-picture.com]
Sent: Tuesday, October 31, 2017 10:31 AM
To: user@guacamole.incubator.apache.org
Subject: Capture keyboard input?

Hi all,

Just wondering if Gauc has the ability to capture all keyboard input? I can’t tell you how many times I’ve accidentally closed the whole tab while typing (CTRL + W)..

Please let me know if this is a possibility, thanks!

Anthony Moon, Senior System Administrator
MPC Film
T +1 604 689 1081 | C +1 604 329 0174
London - Vancouver - LA - Bangalore - Montréal
moving-picture.com/film<http://moving-picture.com/film>


RE: Capture keyboard input?

Posted by Anthony Moon <an...@moving-picture.com>.
Just gonna give this a bump..

From: Anthony Moon [mailto:anthony-m@moving-picture.com]
Sent: Tuesday, October 31, 2017 10:31 AM
To: user@guacamole.incubator.apache.org
Subject: Capture keyboard input?

Hi all,

Just wondering if Gauc has the ability to capture all keyboard input? I can't tell you how many times I've accidentally closed the whole tab while typing (CTRL + W)..

Please let me know if this is a possibility, thanks!

Anthony Moon, Senior System Administrator
MPC Film
T +1 604 689 1081 | C +1 604 329 0174
London - Vancouver - LA - Bangalore - Montréal
moving-picture.com/film<http://moving-picture.com/film>