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

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.

This is very KDE specific. You’d probably get better replies asking on their forum.

This sounds like maybe Multiseat is what you’re looking for? This will allow you to assign specific input hardware, screens, and gpu resources to a second “seat” that essentially gets it’s own login session.

There are some gui tools to help configure, though I don’t think any are packaged yet in nixpkgs.

I do remember there being support in earlier versions of KDE for having multiple seats in one session, with each having a different colored cursor and control over individual windows, but that functionality has not been maintained or was stripped out a long time ago. I’m struggling to even find any old docs for it, just old screenshots.