diff options
author | Paul Seyfert <paul.seyfert@mib.infn.it> | 2016-07-21 19:30:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-02 18:53:15 (GMT) |
commit | e34e9c2705c9e0bb568f5f69a655a9d425ef8adb (patch) | |
tree | 9bc2aac1c6d267a1c6417bc40ab9027a9e5c0545 /Source/CursesDialog/cmCursesBoolWidget.cxx | |
parent | 9a1b6c6037869edba1c44dcfa06da8201653ce1b (diff) | |
download | CMake-e34e9c2705c9e0bb568f5f69a655a9d425ef8adb.zip CMake-e34e9c2705c9e0bb568f5f69a655a9d425ef8adb.tar.gz CMake-e34e9c2705c9e0bb568f5f69a655a9d425ef8adb.tar.bz2 |
ccmake: Add VIM-like bindings for navigation
* scroll with j/k
* toggle bool with space, enter insert mode with i
* bindings not shown at the bottom of the screen, but given in help
Diffstat (limited to 'Source/CursesDialog/cmCursesBoolWidget.cxx')
-rw-r--r-- | Source/CursesDialog/cmCursesBoolWidget.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx index 9bcf050..e36ac34 100644 --- a/Source/CursesDialog/cmCursesBoolWidget.cxx +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -27,8 +27,9 @@ cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, int left, bool cmCursesBoolWidget::HandleInput(int& key, cmCursesMainForm*, WINDOW* w) { + // toggle boolean values with enter or space // 10 == enter - if (key == 10 || key == KEY_ENTER) { + if (key == 10 || key == KEY_ENTER || key == ' ') { if (this->GetValueAsBool()) { this->SetValueAsBool(false); } else { |