mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
Portduino: Catch the keyboard power button and initiate poweroff (#3953)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user