diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ListWidget.cpp | 8 | ||||
-rw-r--r-- | gui/PopUpWidget.cpp | 4 | ||||
-rw-r--r-- | gui/console.cpp | 4 | ||||
-rw-r--r-- | gui/editable.cpp | 4 |
4 files changed, 19 insertions, 1 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index b1e333b1bb..7d809938e2 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -286,7 +286,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { bool dirty = false; int oldSelectedItem = _selectedItem; - if (!_editMode && isprint((unsigned char)state.ascii)) { + if (!_editMode && state.keycode <= Common::KEYCODE_z && isprint((unsigned char)state.ascii)) { // Quick selection mode: Go to first list item starting with this key // (or a substring accumulated from the last couple key presses). // Only works in a useful fashion if the list entries are sorted. @@ -351,27 +351,33 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { } break; case Common::KEYCODE_UP: + case Common::KEYCODE_KP8: if (_selectedItem > 0) _selectedItem--; break; case Common::KEYCODE_DOWN: + case Common::KEYCODE_KP2: if (_selectedItem < (int)_list.size() - 1) _selectedItem++; break; case Common::KEYCODE_PAGEUP: + case Common::KEYCODE_KP9: _selectedItem -= _entriesPerPage - 1; if (_selectedItem < 0) _selectedItem = 0; break; case Common::KEYCODE_PAGEDOWN: + case Common::KEYCODE_KP3: _selectedItem += _entriesPerPage - 1; if (_selectedItem >= (int)_list.size() ) _selectedItem = _list.size() - 1; break; case Common::KEYCODE_HOME: + case Common::KEYCODE_KP7: _selectedItem = 0; break; case Common::KEYCODE_END: + case Common::KEYCODE_1: _selectedItem = _list.size() - 1; break; default: diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp index 35cfaf6d4a..15b7557aef 100644 --- a/gui/PopUpWidget.cpp +++ b/gui/PopUpWidget.cpp @@ -228,15 +228,19 @@ void PopUpDialog::handleKeyDown(Common::KeyState state) { close(); break; case Common::KEYCODE_UP: + case Common::KEYCODE_KP8: moveUp(); break; case Common::KEYCODE_DOWN: + case Common::KEYCODE_KP2: moveDown(); break; case Common::KEYCODE_HOME: + case Common::KEYCODE_KP7: setSelection(0); break; case Common::KEYCODE_END: + case Common::KEYCODE_KP1: setSelection(_popUpBoss->_entries.size()-1); break; default: diff --git a/gui/console.cpp b/gui/console.cpp index 9ac9cf09e1..f412ca4fa0 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -386,17 +386,21 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { draw(); break; case Common::KEYCODE_UP: + case Common::KEYCODE_KP8: historyScroll(+1); break; case Common::KEYCODE_DOWN: + case Common::KEYCODE_KP2: historyScroll(-1); break; case Common::KEYCODE_RIGHT: + case Common::KEYCODE_KP6: if (_currentPos < _promptEndPos) _currentPos++; drawLine(pos2line(_currentPos)); break; case Common::KEYCODE_LEFT: + case Common::KEYCODE_KP4: if (_currentPos > _promptStartPos) _currentPos--; drawLine(pos2line(_currentPos)); diff --git a/gui/editable.cpp b/gui/editable.cpp index 232873ffe3..0eca1aec55 100644 --- a/gui/editable.cpp +++ b/gui/editable.cpp @@ -124,6 +124,7 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { forcecaret = true; break; case Common::KEYCODE_LEFT: + case Common::KEYCODE_KP4: if (_caretPos > 0) { dirty = setCaretPos(_caretPos - 1); } @@ -131,6 +132,7 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { dirty = true; break; case Common::KEYCODE_RIGHT: + case Common::KEYCODE_KP6: if (_caretPos < (int)_editString.size()) { dirty = setCaretPos(_caretPos + 1); } @@ -138,10 +140,12 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { dirty = true; break; case Common::KEYCODE_HOME: + case Common::KEYCODE_KP7: dirty = setCaretPos(0); forcecaret = true; break; case Common::KEYCODE_END: + case Common::KEYCODE_KP1: dirty = setCaretPos(_editString.size()); forcecaret = true; break; |