debauchee / barrier

Open-source KVM software
Other
27.23k stars 1.5k forks source link

When configuring keystrokes in the hotkeys gui, the windows/super key is not captured. #1073

Open dlobue opened 3 years ago

dlobue commented 3 years ago

Describe the bug

When configuring keystrokes in the hotkeys gui, the windows/super key is not captured. This happens when defining the initiating hotkey, as well as when defining keystrokes for the resulting action.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Hotkeys tab in the Server Configuration
  2. Click on New to create a new hotkey
  3. Click on keystroke input
  4. Press the key combination Super+v
  5. Observe that the captured value in the input equals keystroke(v)

Expected behavior

I expect the captured keystroke to read keystroke(Super+v)

Desktop (please complete the following information):

Additional context

I am not running Wayland. I'm running kde/plasma 5 on x11. I discovered this issue when I was creating a hotkey to map ctrl+v to super+v for my mac client.

matiferrigno commented 3 years ago

Did you solve it? Today I read your issue because I was looking the same solution and decided to look on KDE configuration after I notice you use too. Actually I notice that (my) problem** was on KDE and is not a bug on barrier.

duhow commented 3 years ago

Same for me. Debian 11 bullseye x86_64 Linux 5.10.0-6-amd64, KDE 5.78.0 / Plasma 5.20.5. Using last Barrier release 2.3.3 .

edanaher commented 3 years ago

I'm also seeing this on NixOS using FVWM, which definitely doesn't eat the keypress. It was easy enough to work around by exporting the config to a text file and adding it there, but it's inconvenient.

matiferrigno commented 3 years ago

I had this issue but I haven't it any more. Try add this config to your screen.

                meta = altgr
                altgr = shift
PhilCS commented 2 years ago

I tried adding these to my config, but neither works. It's quite unfortunate.

keystroke(Control+y) = keystroke(Super+Shift+z,Phils-MacBook-Pro.local)

keystroke(Control+y) = keystroke(Meta+Shift+z,Phils-MacBook-Pro.local)

Without Shift, both work, which is really weird. With just Shift+z, Shift is not sent at all.

EDIT: For some reason, Z has to be uppercase! This works okay-ish (although far from perfect, you gotta release Ctrl to press Ctrl-Z after)

keystroke(Control+y) = keystroke(Meta+Shift+Z,Phils-MacBook-Pro.local)

Which also works alongside

ctrl = super
super = ctrl
mhagnumdw commented 2 years ago

Has anyone found a workaround yet?

edanaher commented 2 years ago

Regarding a workaround, as I said above (emphasis added):

I'm also seeing this on NixOS using FVWM, which definitely doesn't eat the keypress. It was easy enough to work around by exporting the config to a text file and adding it there, but it's inconvenient.

More explicitly:

  1. Set up a placeholder key binding without Super.
  2. In the Barrier Menu, select "Save configuration". Save this to a file.
  3. Open up the file in any text editor, and edit the key binding to include Super, similar to how PhilCS did. Mine looks like keystroke(Alt+Super+Control+j) = switchToScreen(other). Note also his issues with shift; apparently if you want to do something with the Shift modifier, you need to capitalize the key.
  4. Back in Barrier, select "Use existing configuration" and point it at the file you just set up.

Sadly, AFAICT there's no way to import the config back, so you have to either make further updates in the text file (which honestly, I prefer anyway), or else re-export and fix Super every time you update your configuration.