Which Khadas SBC do you use?
Khadas VIM3 Pro
Which system do you use? Android, Ubuntu, OOWOW or others?
Which version of system do you use? Khadas official images, self built images, or others?
Khadas officieal image
Please describe your issue below:
Hello! Is there any way to assign a custom handler (script) to
Function button? E.g. enable/disable WiFi or any other script?
Post a console log of your issue below:
**Delete this line and post your log here.**
Func key device node is
/dev/input/event4, you can get press/release event from it and do anything you want to do.
evtest to get available devices,
adc_keypad is the
Thank you very much for the quick answer!
That’s almost what we wanted to achieve. One small clarification please:
root@khaleesi-d0:/home/khadas# evtest --grab /dev/input/event0
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys-polled"
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 116 (KEY_POWER)
Testing ... (interrupt to exit)
Event: time 1669708979.092482, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1669708979.092482, -------------- SYN_REPORT ------------
Event: time 1669708979.304480, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1669708979.304480, -------------- SYN_REPORT ------------
# tree /dev/input/
│ ├── platform-ff808000.ir-event -> ../event1
│ └── platform-gpio-keys-polled-event -> ../event0
1 directory, 5 files
As I see, there is no
event4 and listening for
event0 does not react somehow to function key (the middle one) but gives reaction to
Is there some way to enable
Thank you in advance!