mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
Allow hotkeys to submit
This commit is contained in:
parent
30a69b2779
commit
e8c8975f13
4 changed files with 35 additions and 16 deletions
|
@ -62,6 +62,12 @@ ToggleMenuView.prototype.redraw = function() {
|
|||
}
|
||||
};
|
||||
|
||||
ToggleMenuView.prototype.setFocusItemIndex = function(index) {
|
||||
ToggleMenuView.super_.prototype.setFocusItemIndex.call(this, index); // sets this.focusedItemIndex
|
||||
|
||||
this.updateSelection();
|
||||
};
|
||||
|
||||
ToggleMenuView.prototype.setFocus = function(focused) {
|
||||
ToggleMenuView.super_.prototype.setFocus.call(this, focused);
|
||||
|
||||
|
@ -93,14 +99,6 @@ ToggleMenuView.prototype.onKeyPress = function(ch, key) {
|
|||
}
|
||||
}
|
||||
|
||||
if(ch && this.hotKeys) {
|
||||
var keyIndex = this.hotKeys[this.caseInsensitiveHotKeys ? ch.toLowerCase() : ch];
|
||||
if(_.isNumber(keyIndex)) {
|
||||
this.focusedItemIndex = keyIndex;
|
||||
this.updateSelection();
|
||||
}
|
||||
}
|
||||
|
||||
ToggleMenuView.super_.prototype.onKeyPress.call(this, ch, key);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue