Skip to content

Commit

Permalink
Adding TAB key and RIGHT to allow selecting a destination
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnu-Bricoleur authored and caveman99 committed Jun 12, 2024
1 parent 771e657 commit 4255fd4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/input/SerialKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ int32_t SerialKeyboard::runOnce()
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP;
}
else if (!(shiftRegister2 & (1 << 2))) {
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN;
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT;
e.kbchar = 0xb7;
}
else if (!(shiftRegister2 & (1 << 1))) {
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT;
Expand Down Expand Up @@ -129,11 +130,15 @@ int32_t SerialKeyboard::runOnce()
else if (!(shiftRegister1 & (1 << 0))) {
keyPressed = 9;
}
// BACKSPACE
// BACKSPACE or TAB
else if (!(shiftRegister1 & (1 << 7))) {
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK;
e.kbchar = 0x08;
Serial.println("backspace");
if (shift == 0 || shift ==2){ // BACKSPACE
e.inputEvent = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK;
e.kbchar = 0x08;
} else { // shift = 1 or 3 => TAB
e.inputEvent = ANYKEY;
e.kbchar = 0x09;
}
}
// SHIFT
else if (!(shiftRegister2 & (1 << 7))) {
Expand Down

0 comments on commit 4255fd4

Please sign in to comment.