summaryrefslogtreecommitdiff
path: root/inputmethods/multikey
Unidiff
Diffstat (limited to 'inputmethods/multikey') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp30
1 files changed, 24 insertions, 6 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
@@ -302,14 +302,32 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
302 } 302 }
303 303
304 } else if (qkeycode == Qt::Key_Control) { 304 } else if (qkeycode == Qt::Key_Control) {
305 ctrl = keys->pressedPtr(row, col); 305
306 need_repaint = TRUE; 306 if (ctrl) {
307 *ctrl = !keys->pressed(row, col); 307
308 *ctrl = 0;
309 ctrl = 0;
310
311 } else {
312
313 ctrl = keys->pressedPtr(row, col);
314 need_repaint = TRUE;
315 *ctrl = !keys->pressed(row, col);
316
317 }
308 318
309 } else if (qkeycode == Qt::Key_Alt) { 319 } else if (qkeycode == Qt::Key_Alt) {
310 alt = keys->pressedPtr(row, col); 320
311 need_repaint = TRUE; 321 if (alt) {
312 *alt = !keys->pressed(row, col); 322 *alt = 0;
323 alt = 0;
324
325 } else {
326
327 alt = keys->pressedPtr(row, col);
328 need_repaint = TRUE;
329 *alt = !keys->pressed(row, col);
330 }
313 331
314 } else if (qkeycode == Qt::Key_Shift) { 332 } else if (qkeycode == Qt::Key_Shift) {
315 need_repaint = TRUE; 333 need_repaint = TRUE;