From ea0d66f137984689c4d4ef6da7dd4b7323760e8c Mon Sep 17 00:00:00 2001 From: hash Date: Thu, 22 Aug 2002 04:33:16 +0000 Subject: fixed nasty bug related to ctrl and alt keys --- (limited to 'inputmethods/multikey') 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) } } 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; -- cgit v0.9.0.2