Having the global hook implemented through direct /dev/input integration means that it works even when the screen is locked which is not the case on Windows and macOS. Users do not expect this to work when they are entering their OS password, so Keyboard Switch should stop the global hook when the screen is locked.
There is no native way to listen to screen lock events either on X11 or on Wayland, so Keyboard Switch should listen to D-Bus events, and maybe some specific desktop environment stuff to determine whether the screen is locked.
Having the global hook implemented through direct
/dev/inputintegration means that it works even when the screen is locked which is not the case on Windows and macOS. Users do not expect this to work when they are entering their OS password, so Keyboard Switch should stop the global hook when the screen is locked.There is no native way to listen to screen lock events either on X11 or on Wayland, so Keyboard Switch should listen to D-Bus events, and maybe some specific desktop environment stuff to determine whether the screen is locked.