pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
https://pqrs.org/osx/karabiner/
The Unlicense
18.6k stars 836 forks source link

Karabiner does not pick up on any keys through a virtual desktop connection / screensharing #3114

Open momomo opened 2 years ago

momomo commented 2 years ago
  1. On mac0, install karabiner and launch karabiner event viewer
  2. Launch screen sharing from mac1 to mac0 that has karabiner event viewer on.
  3. Type some keys. Eventviewer does not pick up any of it which makes using screensharing more difficult.
MuhammedZakir commented 2 years ago

You will have to use higher-level tools for that. E.g. Hammerspoon and BetterTouchTool.

momomo commented 2 years ago

Yes, I am using keyboard maestro, but I use both and in this instance karabiner is not detecting what higher level programs are able to, why?

MuhammedZakir commented 2 years ago

Because KE works at the lowest level.

physical keyboard -> OS -> low-level remapping tool -> virtual keyboard -> OS -> higher-level remapping tool / apps -> apps
| ------------------------ low-level remapping tool ------------------------- |
                                                                              | --- higher-level remapping tool --------- |

Here, "high" and "low" is referring to where it sits in the hierarchy, not meaning "high" is better than "low".

Edit: Above flowchart is too simplified; actual situation is much more complicated. Edit-2: You can find a presentation about the pros and cons of each method here -- https://github.com/pqrs-org/osx-event-observer-examples. Note: higher-level remapping tools mostly use CGEvent.

momomo commented 2 years ago

I am aware of how karabiner works but I am just saying.

It is normally the higher that are unable to do what karabiner is doing so karabiner should have no issue doing what they are doing and enable support for virtual machines and screensharing software.

The keyboard could be the internal one or connected one, not the remote one. Currently I am able to send karabiner commands from the remote computer to karabiner, but this will fail on program detection since karabiner is not picking any of the keys up, while maestro is.

I understand if it does not do any high level things now but I am saying perhaps it should?