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

  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    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.