How can we pass shortcuts from local machine to noVnc on windows

1,466 views
Skip to first unread message

saket sinha

unread,
Jan 17, 2022, 7:06:56 AM1/17/22
to noVNC
Hi,

Is there any doc that says which all keyboard shortcut works/do not work in noVnc.

We have the following scenario :
From Windows 10 machine -> we connect to Linux machine using noVnc -> from linux VM we connect to a windows machine using xfreerdp package.
Now when pressing keyboard shortcuts like: "Ctrl+Alt+Delete", "Alt + Tab", "Alt + F4" etc. from windows local machine, the expected action doesn't occur on Windows RDP, but it actually gets executed on the local windows machine.

I would like to know if this is possible to execute such keyboard shortcuts on windows VM in the above scenario.

Thanks,
Saket Sinha.

Samuel Mannehed

unread,
Jan 19, 2022, 10:55:04 AM1/19/22
to saket sinha, no...@googlegroups.com
Hi,

> Is there any doc that says which all keyboard shortcut works/do not
> work in noVnc.

There's no such list I'm afraid.

It depends on your web browser. But in general, most system shortcuts
can't be intercepted by the browser. In addition, the browser itself
might add their own shortcuts to that list of "reserved" combinations.

> We have the following scenario :
> From Windows 10 machine -> we connect to Linux machine using noVnc ->
> from linux VM we connect to a windows machine using xfreerdp package.
> Now when pressing keyboard shortcuts like: "Ctrl+Alt+Delete", "Alt +
> Tab", "Alt + F4" etc. from windows local machine, the expected action
> doesn't occur on Windows RDP, but it actually gets executed on the
> local windows machine.
>
> I would like to know if this is possible to execute such keyboard
> shortcuts on windows VM in the above scenario.

If you use our example application vnc.html you have a button in the
GUI for sending Ctrl-Alt-Del to the remote. In your case you also need
to make sure xfreerdp is set to grab all keyboard input from your Linux
VM. Hope that helps.

Best regards,
--
Samuel Mannehed Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46 13 214 600

saket sinha

unread,
Feb 4, 2022, 8:16:00 AM2/4/22
to noVNC
Thanks for the response, Samuel.
Is it possible to provide a rough date when the CTRL+ALT+DEL shortcut was enabled in the noVNC repo? We are currently using a snapshot of "noVNC master"  which was copied almost 4 years back, for which this shortcut is not working.

Samuel Mannehed

unread,
Feb 4, 2022, 8:26:56 AM2/4/22
to saket sinha, no...@googlegroups.com
Hi,

> Is it possible to provide a rough date when the CTRL+ALT+DEL shortcut
> was enabled in the noVNC repo? We are currently using a snapshot of
> "noVNC master" which was copied almost 4 years back, for which this
> shortcut is not working.

This functionality has existed for 12 years:

https://github.com/novnc/noVNC/commit/63708ff5a87be1574d96331a376351b5eff098e7

Are you saying you can't see the button, or that you can see it but it
isn't working?

saket sinha

unread,
Feb 25, 2022, 12:28:38 PM2/25/22
to noVNC
Thanks a lot for finding the relevant commit id, I am able to see the button (the HTML element was set to hidden).
Is it possible to make the following shortcuts work on vnc server:
  • Alt + Tab
  • Ctrl + Alt + Tab
  • Ctrl + Tab
  • Ctrl + Shift + Tab
Also, if possible, can you point me to the code which I can give a try editing to enable these shortcuts?
Thanks again for all your help.

Samuel Mannehed

unread,
Feb 28, 2022, 2:43:41 AM2/28/22
to no...@googlegroups.com
Hi,

On 2022-02-25 18:28, saket sinha wrote:
> Thanks a lot for finding the relevant commit id, I am able to see the
> button (the HTML element was set to hidden).
> Is it possible to make the following shortcuts work on vnc server:
>
> * Alt + Tab
> * Ctrl + Alt + Tab
> * Ctrl + Tab
> * Ctrl + Shift + Tab
>
> Also, if possible, can you point me to the code which I can give a try
> editing to enable these shortcuts?
In app/ui.js you will find functions like sendTab() at line 1557 which
shows how to do this stuff.

You will also have to create button elements in vnc.html, the existing
ones are at line 108.

After adding your own functions and adding the buttons, you will have to
set up event handlers in ui.js, see line 292.

Hope that helps,

saket sinha

unread,
Feb 28, 2022, 3:28:55 AM2/28/22
to noVNC
Sorry, my bad. What I mean is, is it possible to allow the following shortcuts to work from the keyboard directly, without the need to add a button in HTML. The users want to execute these shortcuts directly from the keyboard without clicking on any button.
> * Alt + Tab
> * Ctrl + Alt + Tab
> * Ctrl + Tab
> * Ctrl + Shift + Tab

Btw, thanks again for providing the details above.

saket sinha

unread,
Mar 2, 2022, 12:38:26 AM3/2/22
to noVNC
Gentle reminder on this!!

Pierre Ossman

unread,
Mar 2, 2022, 2:37:54 AM3/2/22
to no...@googlegroups.com, saket sinha
On 28/02/2022 09:28, saket sinha wrote:
> Sorry, my bad. What I mean is, is it possible to allow the following
> shortcuts to work from the keyboard directly, without the need to add a
> button in HTML. The users want to execute these shortcuts directly from the
> keyboard without clicking on any button.
>> * Alt + Tab
>> * Ctrl + Alt + Tab
>> * Ctrl + Tab
>> * Ctrl + Shift + Tab
>

The short answer is no.

The longer answer is that it is up to your browser what keyboard
shortcuts we are allowed to grab from javascript. All the major browsers
have a handful of shortcuts that they never allow javascript to handle.
Then there are also shortcuts that the local system don't generally
allow applications to override, like Alt+Tab.

So if you want improvements here I'm afraid you'll have to request more
functionality from the browsers first.

Regards
--
Pierre Ossman Software Development
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Reply all
Reply to author
Forward
0 new messages