Portduino: Catch the keyboard power button and initiate poweroff (#3953)

This commit is contained in:
Jonathan Bennett 2024-05-22 07:54:06 -05:00 committed by GitHub
parent 0c9da9aec7
commit 7bcb8f1fee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;