I have a laptop with Void-Linux and Wayland desktop environment (sway). I'm trying to bind laptop's open/close event to custom command, but I can't scan key events here. I tried it with showkey --scancodes and showkey --keycodes from console outside Wayland environment, but it shows nothing when I open or close laptop. How to correctly scan open/close events or bind it in Wayland?
PS: I don't really want to install some complex tools like laptop-mode tools (if it's possible), I just need to run very primitive bash scripts on open/close.