How to lock a HID device to a specific window or screen?

On kde/wayland

i want to lock a keyboard and controller so they are only seen by one window, as in inputs only go that window and it cant move elsewhere.

Also using nixos.

  • SpiderUnderUrBed@lemmy.zipOP
    link
    fedilink
    arrow-up
    1
    ·
    16 hours ago

    My use case is an expo, we have a game people can play on display and I’m doing things on my main screen, ideally I can continue doing work while people try the game but at the bare minimum I would like the keyboard to he restricted to that app.

    • Björn@swg-empire.de
      link
      fedilink
      arrow-up
      4
      ·
      15 hours ago

      I wouldn’t entrust such an important display to some hacky solution a bunch of Lemmy users can come up with. Set up a normal kiosk environment and do your work on a second machine. You can ssh or even Sunshine/Moonlight into the gaming machine if you have to do something there.

      But you don’t want something a potential customer does on the game to crash your work or vice versa. Or even worse something goes wrong and the customers can suddenly see your work on their screen. Best to separate those things as much as possible.