summaryrefslogtreecommitdiff
Unidiff
Diffstat (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
@@ -293,32 +293,50 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
293 connect(configdlg, SIGNAL(pickboardToggled(bool)), 293 connect(configdlg, SIGNAL(pickboardToggled(bool)),
294 this, SLOT(togglePickboard(bool))); 294 this, SLOT(togglePickboard(bool)));
295 connect(configdlg, SIGNAL(repeatToggled(bool)), 295 connect(configdlg, SIGNAL(repeatToggled(bool)),
296 this, SLOT(toggleRepeat(bool))); 296 this, SLOT(toggleRepeat(bool)));
297 connect(configdlg, SIGNAL(reloadKeyboard()), 297 connect(configdlg, SIGNAL(reloadKeyboard()),
298 this, SLOT(reloadKeyboard())); 298 this, SLOT(reloadKeyboard()));
299 configdlg->showMaximized(); 299 configdlg->showMaximized();
300 configdlg->show(); 300 configdlg->show();
301 configdlg->raise(); 301 configdlg->raise();
302 } 302 }
303 303
304 } else if (qkeycode == Qt::Key_Control) { 304 } else if (qkeycode == Qt::Key_Control) {
305
306 if (ctrl) {
307
308 *ctrl = 0;
309 ctrl = 0;
310
311 } else {
312
305 ctrl = keys->pressedPtr(row, col); 313 ctrl = keys->pressedPtr(row, col);
306 need_repaint = TRUE; 314 need_repaint = TRUE;
307 *ctrl = !keys->pressed(row, col); 315 *ctrl = !keys->pressed(row, col);
308 316
317 }
318
309 } else if (qkeycode == Qt::Key_Alt) { 319 } else if (qkeycode == Qt::Key_Alt) {
320
321 if (alt) {
322 *alt = 0;
323 alt = 0;
324
325 } else {
326
310 alt = keys->pressedPtr(row, col); 327 alt = keys->pressedPtr(row, col);
311 need_repaint = TRUE; 328 need_repaint = TRUE;
312 *alt = !keys->pressed(row, col); 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;
316 334
317 if (shift) { 335 if (shift) {
318 *shift = 0; 336 *shift = 0;
319 shift = 0; 337 shift = 0;
320 } 338 }
321 else { 339 else {
322 shift = keys->pressedPtr(row, col); 340 shift = keys->pressedPtr(row, col);
323 *shift = 1; 341 *shift = 1;
324 if (lock) { 342 if (lock) {