There was some good discussion today. @Thaodan mentioned some discussion from flatpak with a similar issue. In short, we probably need a permission. Though I don’t see what that has to do with linking to udev, per se? Here the relevant links.
- Add joystick access to the sandbox · Issue #7 · flatpak/flatpak · GitHub (Thaodan, 08:13:43)
- staging/inputfd: Direct input access protocol (!110) · Merge requests · wayland / wayland-protocols · GitLab (Thaodan, 08:13:54)
- (re Sailjail joypad access) “just allowing the use of /dev/input/js* might be a good workaround for now.” (flypig, 08:15:28)
- the Wayland protocol mentioned earlier the might exist, is wip right now: (Thaodan, 08:17:35)
- staging/inputfd: Direct input access protocol (!110) · Merge requests · wayland / wayland-protocols · GitLab (Thaodan, 08:17:46)
@pvuorela had summarized:
yea, so on permission side there seem to be multiple problematic details. a) would need to get access to libudev, b) would also need access to the joypad devices but only them, c) the access to the /dev node could be problematic, there’s resource policy handling, eg two apps wanting to use the same device.
compare to e.g. bluetooth keyboard which doesn’t need any permissions and goes over wayland. might be nice if there was some similar wayland protocol for this. did find some preliminary work but that was getting old.