mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-08 21:51:46 +00:00
Portduino: Catch the keyboard power button and initiate poweroff (#3953)
This commit is contained in:
parent
0c9da9aec7
commit
7bcb8f1fee
@ -155,6 +155,9 @@ int32_t LinuxInput::runOnce()
|
||||
case KEY_ENTER: // Enter
|
||||
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT;
|
||||
break;
|
||||
case KEY_POWER:
|
||||
system("poweroff");
|
||||
break;
|
||||
default: // all other keys
|
||||
if (keymap[code]) {
|
||||
e.inputEvent = ANYKEY;
|
||||
|
Loading…
Reference in New Issue
Block a user