Skip to content

Commit

Permalink
addedmain menu shortcuts (pr3y#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
eadmaster committed Jul 21, 2024
1 parent 3ea8617 commit 7f13457
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ void loop() {
delay(200);
}

checkShortcutPress(); // shortctus to quickly start apps without navigating the menus

if(checkPrevPress()) {
if(index==0) index = opt - 1;
else if(index>0) index--;
Expand Down
16 changes: 16 additions & 0 deletions src/mykeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ bool checkEscPress(){
else { return false; }
}

#include "TV-B-Gone.h"
#include "rf.h"
#include "webInterface.h"

void checkShortcutPress(){
// some shortctus to quickly starts apps
#if defined (CARDPUTER)
Keyboard.update();
if(Keyboard.isKeyPressed('i')) otherIRcodes();
if(Keyboard.isKeyPressed('r') || Keyboard.isKeyPressed('s')) otherRFcodes();
if(Keyboard.isKeyPressed('w')) loopOptionsWebUi();
// TODO: other boards
// TODO: user-configurable
#endif
}

#ifndef STICK_C
/* Starts keyboard to type data */
String keyboard(String mytext, int maxSize, String msg) {
Expand Down
4 changes: 3 additions & 1 deletion src/mykeyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ bool checkPrevPress();

bool checkSelPress();

bool checkEscPress();
bool checkEscPress();

void checkShortcutPress();

0 comments on commit 7f13457

Please sign in to comment.