diff options
Diffstat (limited to 'gui/ListWidget.cpp')
-rw-r--r-- | gui/ListWidget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 3d5c3dee62..1ca6846e86 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -243,6 +243,17 @@ bool ListWidget::handleKeyDown(Common::KeyState state) { sendCommand(kListItemActivatedCmd, _selectedItem); } break; + case Common::KEYCODE_BACKSPACE: + case Common::KEYCODE_KP_PERIOD: + case Common::KEYCODE_DELETE: + if (_selectedItem >= 0) { + if (_editable) { + // Ignore delete and backspace when the list item is editable + } else { + sendCommand(kListItemRemovalRequestCmd, _selectedItem); + } + } + break; case Common::KEYCODE_UP: if (_selectedItem > 0) _selectedItem--; |