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.

  • Yardy Sardley@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    2 days ago

    There’s a kiosk-style compositor called cage that would work, at least for your main concern.

    Then maybe use waypipe over ssh to do your work in the background. Alternatively, you can research setting up a multi-seat display manager, but I think you would need at least 2 GPUs to implement that properly.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 days ago

    It’s sort of possible, but you’d need to build an accessibility extension for KDE to do so.

    Can you be more specific about what you’re trying to do?

    • SpiderUnderUrBed@lemmy.zipOP
      link
      fedilink
      arrow-up
      3
      ·
      2 days 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.

      • just_another_person@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        2 days ago

        Ah, then you probably want KDE’s kiosk mode for a second screen with a second user that you can set the defined activity for. Should be quick and easy that way versus trying to split a session and window input.