Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcuts #1881

Closed
jdvmanen opened this issue Oct 8, 2020 · 19 comments
Closed

Shortcuts #1881

jdvmanen opened this issue Oct 8, 2020 · 19 comments
Assignees

Comments

@jdvmanen
Copy link

jdvmanen commented Oct 8, 2020

issue #730 would make Mescentral to my very best friend. I'm kind of married with my keyboard and try to ignore my mouse as much as possible. However, Remote Sessions via meshcentral forces me to move to the mouse.

Is there any change #730 will get rid of the tag 'WontFix'? possible solutions are mentioned in there?

@Ylianst Ylianst self-assigned this Oct 8, 2020
@Ylianst
Copy link
Owner

Ylianst commented Oct 8, 2020

Because MeshCentral runs in a browser, there are keys that we can't capture. This said, can you try MeshCentral Router? You can right click on a device and select "Remote Desktop". That is a native Windows viewer and should capture more keys including the Windows key. Let me know if that works.

MC2-ImprovedMeshRouter

@ryanblenis
Copy link
Contributor

I don't know if it has been looked into, but for some browsers (Chrome) this may be a possibility with the the newer keyboard lock API https://web.dev/keyboard-lock/ . From a quick read it seems the Windows key is encompassed in it. I primarily use macOS as the controlling computer, so I haven't run a test, but it may in fact be possible.

@Ylianst
Copy link
Owner

Ylianst commented Oct 8, 2020

Ha yes, I need to look into this.

@jdvmanen
Copy link
Author

jdvmanen commented Oct 9, 2020

The MeshCentral Router is great, it supports the keyboard short cuts as required. Thanks for that suggestion!!

The option mentiond by @ryanblenis is worth investigating. I think this should be a great improvement...

@ryanblenis
Copy link
Contributor

Just wanted to update this post:

As stated before, I use a Mac for the admin side, so I have been able to use Cmd-* functions that pass through to Windows systems as WinKey-* functions without issue. As of the latest versions (at least 0.7.10+) this is no longer the case for all combinations, as the OS/browser now intercept several commands (such as Cmd-R to open a Run dialog on a remote Windows machine), which is now being captured by the host OS (leading Cmd-R to reload the page in the local browser). So it would be wonderful to take a look at the keyboard lock API for another reason now!

@Ylianst
Copy link
Owner

Ylianst commented Jan 8, 2021

Somewhat related, starting with MeshCentral v0.7.45 you can customize shortcuts on the website.

MC2-KeyboardShortcuts1

@fanynek86
Copy link

Hello everyone!
Keyboard shortcuts (eg WIN+R; ALT+TAB, etc.) cannot be used very well via a web browser. You can use the "Send" button, but this is very slow. MeshCentral Router also does not always perform correctly even when the "Use Remote Keyboard Map" option is checked. It would not be possible to bind shortcuts, for example Shift+F1
= ALT+TAB etc.?

Wtih BR
František

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

@fanynek86 ALT+TAB does work as ive just tried it here BUT do note, it only works because im on mac

if you are using the SAME OS as the remote device, then YOUR OS will take over controls of certain key presses
for example you cant CTRL+ALT+DELETE as your OS takes over those commands,
its sometimes the same for CTRL+W or ALT+F4 !

but sadly the is no way currently to bind different key presses to different key presses like you said
SHIFT+F1 presses ALT+TAB

@fanynek86
Copy link

@si458 And the possibility that @ryanblenis mentioned here is not possible https://web.dev/keyboard-lock/ ? I tried it in the DEMO here: https://keyboard-lock.glitch.me/ and it worked beautifully. It only works for me on Chrome. Unfortunately, FireFox does not support this.

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

@fanynek86 That's the problem, it's only Chrome support, the is no safari, and Firefox support
So we can't really implement something with only 1 browser in mind. It needs to work for all browsers

@fanynek86
Copy link

@si458 So far I have tried Edge, Vivaldi.. All browsers that have Chromium core support this feature.
Chrome alone has 84% ​​representation. Safari has only 5.3% representation. I think this is about the support of the vast majority of browsers.

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

@fanynek86 ive just realised/noticed in the source code
if you HOLD the SHIFT key while clicking the fullscreen button, it will ask the browser to go fullscreen
and according to the docs https://wicg.github.io/keyboard-lock/#escape-key all we need to do is lock and unlock
before we go fullscreen with requestFullscreen
so in theory it might already work from the word go!
i will do some testing!
so windows os to windows os correct that you have the issues with?

@fanynek86
Copy link

@si458 Unfortunately, I tried everything in fullscreen in the browser while clicking the "fullscreen" icon in MeshCentral before writing this post. Hotkey transfer only works via MeshCentral Router and not always. That's why I found this solution to be a handy help for many of us. Yes, I use Windows OS.
Sorry, I don't understand what you mean - lock and unlock before going to full screen mode?

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

@fanynek86 if you are happy changing some code to do some testing here what you can do.

  1. inside default.handlebars the is a function called enterBrowserFullscreen
    add the following inside the function at the beginning of the function
    if (navigator.keyboard && navigator.keyboard.lock) { navigator.keyboard.lock(); }
  2. inside default.handlebars the is a function called exitBrowserFullscreen
    add the following inside the function but at the end of the function
    if (navigator.keyboard && navigator.keyboard.unlock) { navigator.keyboard.unlock(); }
  3. make sure you use the ENGLISH web ui for testing /?lang=en
  4. refresh the webpage then connect to a device then HOLD THE SHIFT KEY while clicking the full screen button
  5. try all the different key presses, see if they work

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

@fanynek86 you can also try, just before you hold the shift key and click the fullscreen icon,
enter navigator.keyboard.lock(); into your developer tools of the chrome browser to activate the lock feature

then once you leave the full screen, run navigator.keyboard.unlock(); to get control back

@fanynek86
Copy link

@si458 Great, I used the first option and everything works exactly as it should (ALT+TAB; WIN+R; WIN+PAUSE, etc.). Thank you very much for your help. A very useful feature that will help us all.

si458 added a commit that referenced this issue Aug 27, 2024
Signed-off-by: si458 <simonsmith5521@gmail.com>
@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

@fanynek86 glad that worked! ive just pushed it to the repo so im going to close this issue now :)

@si458 si458 closed this as completed Aug 27, 2024
si458 added a commit that referenced this issue Aug 27, 2024
Signed-off-by: si458 <simonsmith5521@gmail.com>
@fanynek86
Copy link

@si458 The absolute nicest thing would be if we could press activate it in a window and not have to be in fullscreen.

Here is another alternative:
https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/lock

If you think of something...

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

sadly, if you read the specs
https://wicg.github.io/keyboard-lock/#handling-keyboard-events
https://developer.chrome.com/docs/capabilities/web-apis/keyboard-lock#prerequisite
the webrowser MUST be in full-screen mode, so sadly it cannot be used in a non-fullscreen mode!
nothing we can do, its up to chrome to implement it (which they wont as they have to follow the specs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants