[education/rkward/devel/workspace_output] /: fix cursor navigation in completion list
Thomas Friedrichsmeier
null at kde.org
Sat Mar 5 15:05:04 GMT 2022
Git commit 36aaf60588408c2cad71f9b01902ed0a0f02793d by Thomas Friedrichsmeier.
Committed on 05/03/2022 at 15:04.
Pushed by tfry into branch 'devel/workspace_output'.
fix cursor navigation in completion list
M +1 -0 ChangeLog
M +6 -1 rkward/windows/rkcodecompletion.cpp
https://invent.kde.org/education/rkward/commit/36aaf60588408c2cad71f9b01902ed0a0f02793d
diff --git a/ChangeLog b/ChangeLog
index 2e652f17..b30b59bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ TODOS for output directories:
- create new empty file
- open "default.rko" <- default setting?)
+- Fixed: Cursor navigation in completion list
- rkwardtests library gains helper functions for checking for expected errors
- Internal: Allow R-level calls to support both subcommands, and a return value at the same time
- Fixed: Calling (rk.)select.list() without a title would fail
diff --git a/rkward/windows/rkcodecompletion.cpp b/rkward/windows/rkcodecompletion.cpp
index fe4f87b7..8df52e41 100644
--- a/rkward/windows/rkcodecompletion.cpp
+++ b/rkward/windows/rkcodecompletion.cpp
@@ -434,7 +434,12 @@ bool RKCompletionManager::eventFilter (QObject*, QEvent* event) {
// Make up / down-keys (without alt) navigate in the document (aborting the completion)
// Make alt+up / alt+down navigate in the completion list
if (navigate) {
- if (k->type() != QKeyEvent::KeyPress) return true; // eat the release event
+ if (k->type() == QKeyEvent::ShortcutOverride) {
+ k->accept(); // -> will be re-sent as a regular key event, then handled, below
+ return true;
+ } else {
+ if (k->type() != QKeyEvent::KeyPress) return true; // eat the release event
+ }
// No, we cannot just send a fake key event, easily...
KActionCollection *kate_edit_actions = view ()->findChild<KActionCollection*> ("edit_actions");
More information about the rkward-tracker
mailing list