this post was submitted on 16 Jul 2023
11 points (78.9% liked)

Asklemmy

43901 readers
1705 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
 

Used to use reWASD and sometimes AutoHotkey on windows, but neither of these have linux support. Googling returns a couple of solutions but they're for x11.

I'm considering just giving up and writing macros in python, but that makes it a great deal more difficult to make quick and dirty scripts

top 3 comments
sorted by: hot top controversial new old

Wayland doesn't permit applications to capture the input if their windows are not in focus. Applications just scanning the keyboard to detect key presses won't work.

Somewhere last year, the global shortcut portal spec was merged into xdg-desktop-portals. This allows applications to register global hotkeys without allowing every window to spy on every other window. I don't know what versions/distros you need to get that support, but you'll probably need something released this year.

Applications don't seem all that eager to implement this API, though. You can work around it by using your desktop environment's system shortcuts and assigning them to shell commands that will pass messages through for you through network APIs/DBUS/UNIX sockets/whatever your application accepts.

Alternatively, your planned Python script could do the necessary portal calls if you're still willing to go the script route.

[โ€“] wispydust@sh.itjust.works 2 points 1 year ago

KMonad!

It's more like an analogue for QMK (custom keyboard firmware) than reWASD though with features oriented towards rearranging, layers, etc. But it can do more than that, too.

Also it works on Xorg, Windows and macOS too.

https://github.com/kmonad/kmonad

[โ€“] jeena@jemmy.jeena.net 1 points 1 year ago

https://tube.jeena.net/w/nhWrNZpPG5ribE7MYYh3TF This is how I do it for OBS in GNOME and Wayland.

load more comments
view more: next โ€บ