author | hash <hash> | 2002-08-22 04:33:16 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-22 04:33:16 (UTC) |
commit | ea0d66f137984689c4d4ef6da7dd4b7323760e8c (patch) (side-by-side diff) | |
tree | 75332072b67132ef7fd7559578b7f02405d69a88 /inputmethods/multikey | |
parent | ee90b966cfc262770ef5a45c2bad0af6766245a2 (diff) | |
download | opie-ea0d66f137984689c4d4ef6da7dd4b7323760e8c.zip opie-ea0d66f137984689c4d4ef6da7dd4b7323760e8c.tar.gz opie-ea0d66f137984689c4d4ef6da7dd4b7323760e8c.tar.bz2 |
fixed nasty bug related to ctrl and alt keys
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 30 |
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 @@ -301,16 +301,34 @@ void Keyboard::mousePressEvent(QMouseEvent *e) configdlg->raise(); } } else if (qkeycode == Qt::Key_Control) { - ctrl = keys->pressedPtr(row, col); - need_repaint = TRUE; - *ctrl = !keys->pressed(row, col); + + 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) { - alt = keys->pressedPtr(row, col); - need_repaint = TRUE; - *alt = !keys->pressed(row, col); + + 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; |