Answering myself. Yes, there is a quite nice method. There's an event associated with this button. /dev/input/by-path/platform-gpio-keys-event points to an event (number 5 in my case). This is the script (Python3): import struct with open(f'/dev/input/by-path/platform-gpio-keys-event', "rb"...