Skip to content

Commit 7f13457

Browse files
committed
addedmain menu shortcuts (pr3y#64)
1 parent 3ea8617 commit 7f13457

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ void loop() {
193193
delay(200);
194194
}
195195

196+
checkShortcutPress(); // shortctus to quickly start apps without navigating the menus
197+
196198
if(checkPrevPress()) {
197199
if(index==0) index = opt - 1;
198200
else if(index>0) index--;

src/mykeyboard.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ bool checkEscPress(){
5959
else { return false; }
6060
}
6161

62+
#include "TV-B-Gone.h"
63+
#include "rf.h"
64+
#include "webInterface.h"
65+
66+
void checkShortcutPress(){
67+
// some shortctus to quickly starts apps
68+
#if defined (CARDPUTER)
69+
Keyboard.update();
70+
if(Keyboard.isKeyPressed('i')) otherIRcodes();
71+
if(Keyboard.isKeyPressed('r') || Keyboard.isKeyPressed('s')) otherRFcodes();
72+
if(Keyboard.isKeyPressed('w')) loopOptionsWebUi();
73+
// TODO: other boards
74+
// TODO: user-configurable
75+
#endif
76+
}
77+
6278
#ifndef STICK_C
6379
/* Starts keyboard to type data */
6480
String keyboard(String mytext, int maxSize, String msg) {

src/mykeyboard.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ bool checkPrevPress();
1010

1111
bool checkSelPress();
1212

13-
bool checkEscPress();
13+
bool checkEscPress();
14+
15+
void checkShortcutPress();

0 commit comments

Comments
 (0)