TigerVNC / tigervnc

High performance, multi-platform VNC client and server
https://tigervnc.org
GNU General Public License v2.0
5.11k stars 936 forks source link

trapping of all input in window mode #102

Open specing opened 9 years ago

specing commented 9 years ago

I am connecting to a remote running the same tiling window manager that I am running on my machine and while keyboard control keys work fine in fullscreen, I would like to have an option for tigerVNC to trap all keys even when in window mode.

Something like what Qemu SDL window does, upon clicking on it with mouse it traps all input except a configurable escape code (e.g. right CTRL).

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/7831812-trapping-of-all-input-in-window-mode?utm_campaign=plugin&utm_content=tracker%2F3557444&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F3557444&utm_medium=issues&utm_source=github).
CendioOssman commented 9 years ago

Overlaps with issue #2.

specing commented 9 years ago

Hah, anniversary edition.

hackonteur commented 8 years ago

I looked into this a little bit and got frustrated. I only have a build environment working in Linux at the moment, but I got the keyboard grabbing to working in windowed mode there. The problem was the ungrabbing. I think that I ran into some fundamental issues with FLTK, at least in X. If I move the mouse from inside the window to the titlebar, I see FL_LEAVE. Then if I push down the mouse button on the titlebar and drag it around, when I release the mouse button I get an FL_FOCUS and FL_ENTER. If I continue moving the mouse above the titlebar, I never get an FL_LEAVE event, so there is no way to ungrab the keyboard in that case.

CendioOssman commented 8 years ago

Does indeed sound like a FLTK bug. You could try asking on their mailing list if you don't want to dig around in FLTK yourself.

hackonteur commented 8 years ago

For those interested in this feature, it is worth noting that TurboVNC already supports it (although it is not documented): https://github.com/TurboVNC/turbovnc/issues/26

Also remember that you can use the TurboVNC viewer with the TigerVNC server.

JoseTomasTocino commented 6 years ago

Has there been any progress in this issue?

CendioOssman commented 6 years ago

Not much unfortunately. I've started playing around with a different approach to the hotkeys in order to make something like this easier to handle.

djuarezg commented 4 years ago

still no update?

CendioOssman commented 4 years ago

Afraid not. Trying to focus on things like #838 right now.

vermgit commented 3 years ago

It's 2021 now, so 6.5 years have passed by. Any chance we can have this please?

I mean how am I supposed to switch windows on the remote machine? Clicking the app in the task bar is cumbersome as I'm a keyboard person.

danielkrajnik commented 2 years ago

It would be really helpful if TigerVNC viewer could capture keyboard like remmina does. Working without it is so much harder.

EDIT: TurboVNC supports keyboard capture (ctrl+alt+shift+G). Is it possible to "copy-paste" that feature to TigerVNC?

EDIT2: I've mentioned that they both stem from TightVNC thinking that it might make it any easier, which is a bit unfair.

nesqi commented 2 years ago

It would be great if this could be implemented in some way for two reasons.

  1. I can't get full-screen to work. No matter what I do, selecting it does nothing.
  2. I don't want or need full-screen. I need keyboard grabbing in order to use my hotkeys on the remote computer.

Why couldn't keybord-grab be triggered by menukey+g or something like that. It should be super-simple to implement.

Apteryks commented 2 years ago

I'd like this, because fullscreen doesn't work correctly on my tiling window manager (ratpoison) for some reason. Is full screen working for other tiling window managers? The window seems to attempt to use my full monitor instead of the tiling frame, and gets hidden/doesn't redraw correctly.

quyleanh commented 2 years ago

There is still no solution for this issue? :'(

Apteryks commented 2 years ago

Not that I know, but as hinted in https://github.com/TigerVNC/tigervnc/issues/102#issuecomment-169082759, the TurboVNC client can be used if you need this feature.

quyleanh commented 2 years ago

Not that I know, but as hinted in #102 (comment), the TurboVNC client can be used if you need this feature.

Thank you for remind. I've read it and also found out that RealVNC also support passing system keys directly to server.

However, I would like to use TigerVNC and look forward to seeing TigerVNC support this small (I think) feature. Someone has patched and people said that it worked in #2 (comment)

benoit-bertholon commented 1 year ago

Hello, I had the problem too. The code is quite clean so I did a fork and managed to recompile vncviewer so that it grabs the keyboard. https://github.com/benoit-bertholon/tigervnc/blob/bbe_grab_keyboard/install.rst

I tested it only for ubuntu 22.04