Skip to content

Commit b37bebf

Browse files
committed
Merge branch 'noAccels'
2 parents 7a8f3a4 + 9d8fc7c commit b37bebf

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/menuIo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ Used menuOut::printMenu(navNode &nav,idx_t panelNr) {
373373
}
374374
setColor(fgColor,selected,p.enabled,ed);
375375
//should we use accels on pads?
376-
if ((!asPad)&&(drawNumIndex&style)) {//<-- NO INDEX FOR PADS
376+
if (nav.root->useAccel&&(!asPad)&&(drawNumIndex&style)) {//<-- NO INDEX FOR PADS
377377
char a=top+i+'1';
378378
print('[');
379379
// if (p.is(_Exit)) {//this would require an enourmous confusiuon on keyboard accels

src/nav.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ idx_t panelsList::maxY() const {
2222

2323
navCmd navNode::navKeys(char ch) {
2424
trace(MENU_DEBUG_OUT<<"navNode::navKeys"<<endl);
25-
if (strchr(numericChars,ch)) {
25+
if (root->useAccel&&strchr(numericChars,ch)) {
2626
return navCmd(idxCmd,ch-'1');
2727
}
2828
for(uint8_t i=0;i<sizeof(options->navCodes)/sizeof(navCode);i++)

src/nav.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
idx_t inputBurst=1;//limit of inputs that can be processed before output
9090
unsigned long lastChanged=0;//last change detected (can be external activity)
9191
int timeOut=0;//enter idle mode after `timeOut` seconds of inactivity
92+
bool useAccel=true;//use numeric accelerators to send idxCmd
9293
inline navRoot(menuNode& root,navNode* path,idx_t d,menuIn& in,outputsList &o)
9394
:out(o),in(in),path(path),maxDepth(d-1) {
9495
useMenu(root);

0 commit comments

Comments
 (0)