fixed the navigation in the menus
This commit is contained in:
parent
7249522016
commit
1bfc2554f8
|
@ -2,9 +2,9 @@
|
||||||
// github.com/n0xa | IG: @4x0nn
|
// github.com/n0xa | IG: @4x0nn
|
||||||
|
|
||||||
// -=-=-=-=-=-=- Uncomment the platform you're building for -=-=-=-=-=-=-
|
// -=-=-=-=-=-=- Uncomment the platform you're building for -=-=-=-=-=-=-
|
||||||
#define STICK_C_PLUS
|
//#define STICK_C_PLUS
|
||||||
//#define STICK_C
|
//#define STICK_C
|
||||||
//#define CARDPUTER
|
#define CARDPUTER
|
||||||
// -=-=- Uncommenting more than one at a time will result in errors -=-=-
|
// -=-=- Uncommenting more than one at a time will result in errors -=-=-
|
||||||
|
|
||||||
String buildver="2.0.2";
|
String buildver="2.0.2";
|
||||||
|
@ -149,14 +149,14 @@ void switcher_button_proc() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(KB)
|
//#if defined(KB)
|
||||||
void check_kb(){
|
// void check_kb(){
|
||||||
M5Cardputer.update();
|
// M5Cardputer.update();
|
||||||
if (M5Cardputer.Keyboard.isChange()) {
|
// if (M5Cardputer.Keyboard.isChange()) {
|
||||||
delay(100);
|
// delay(100);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
#endif
|
//#endif
|
||||||
// Tap the power button from pretty much anywhere to get to the main menu
|
// Tap the power button from pretty much anywhere to get to the main menu
|
||||||
void check_menu_press() {
|
void check_menu_press() {
|
||||||
#if defined(AXP)
|
#if defined(AXP)
|
||||||
|
@ -174,14 +174,16 @@ void check_menu_press() {
|
||||||
|
|
||||||
bool check_next_press(){
|
bool check_next_press(){
|
||||||
#if defined(KB)
|
#if defined(KB)
|
||||||
|
M5Cardputer.update();
|
||||||
if (M5Cardputer.Keyboard.isKeyPressed(';')){
|
if (M5Cardputer.Keyboard.isKeyPressed(';')){
|
||||||
// hack to handle the up arrow
|
// hack to handle the up arrow
|
||||||
cursor = cursor - 2;
|
cursor = cursor - 2;
|
||||||
check_kb();
|
// check_kb();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
M5Cardputer.update();
|
||||||
if (M5Cardputer.Keyboard.isKeyPressed(KEY_TAB) || M5Cardputer.Keyboard.isKeyPressed('.')){
|
if (M5Cardputer.Keyboard.isKeyPressed(KEY_TAB) || M5Cardputer.Keyboard.isKeyPressed('.')){
|
||||||
check_kb();
|
// check_kb();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -194,6 +196,7 @@ bool check_next_press(){
|
||||||
|
|
||||||
bool check_select_press(){
|
bool check_select_press(){
|
||||||
#if defined(KB)
|
#if defined(KB)
|
||||||
|
M5Cardputer.update();
|
||||||
if (M5Cardputer.Keyboard.isKeyPressed(KEY_ENTER) || M5Cardputer.Keyboard.isKeyPressed('/')){
|
if (M5Cardputer.Keyboard.isKeyPressed(KEY_ENTER) || M5Cardputer.Keyboard.isKeyPressed('/')){
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -664,7 +667,7 @@ void sendAllCodes() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(KB)
|
#if defined(KB)
|
||||||
check_kb();
|
// check_kb();
|
||||||
#endif
|
#endif
|
||||||
if (check_select_press()){
|
if (check_select_press()){
|
||||||
Serial.println("endingearly");
|
Serial.println("endingearly");
|
||||||
|
@ -1597,7 +1600,7 @@ void loop() {
|
||||||
screen_dim_proc();
|
screen_dim_proc();
|
||||||
#endif
|
#endif
|
||||||
#if defined(CARDPUTER)
|
#if defined(CARDPUTER)
|
||||||
check_kb();
|
// check_kb();
|
||||||
#endif
|
#endif
|
||||||
check_menu_press();
|
check_menu_press();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue