summaryrefslogtreecommitdiff
path: root/inputmethods/multikey
Side-by-side diff
Diffstat (limited to 'inputmethods/multikey') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index d5a7afd..7098a6b 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -299,20 +299,38 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
configdlg->showMaximized();
configdlg->show();
configdlg->raise();
}
} else if (qkeycode == Qt::Key_Control) {
+
+ if (ctrl) {
+
+ *ctrl = 0;
+ ctrl = 0;
+
+ } else {
+
ctrl = keys->pressedPtr(row, col);
need_repaint = TRUE;
*ctrl = !keys->pressed(row, col);
+ }
+
} else if (qkeycode == Qt::Key_Alt) {
+
+ if (alt) {
+ *alt = 0;
+ alt = 0;
+
+ } else {
+
alt = keys->pressedPtr(row, col);
need_repaint = TRUE;
*alt = !keys->pressed(row, col);
+ }
} else if (qkeycode == Qt::Key_Shift) {
need_repaint = TRUE;
if (shift) {
*shift = 0;