Fixed the dead key misbehavior when typing fast: we don't change the deadkey status on key up anymore.

I thought there was a ticket about this bug, but couldn't find it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33750 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2009-10-24 00:31:04 +00:00
parent dfdfbd3eef
commit 676d27510d
@@ -706,7 +706,7 @@ KeyboardDevice::_ControlThread()
}
uint8 newDeadKey = 0;
if (activeDeadKey == 0)
if (activeDeadKey == 0 || !isKeyDown)
newDeadKey = fKeymap.IsDeadKey(keycode, fModifiers);
if (newDeadKey == 0) {
@@ -757,11 +757,16 @@ KeyboardDevice::_ControlThread()
delete[] rawString;
if (isKeyDown && !modifiers && activeDeadKey != 0
&& fInputMethodStarted) {
if (isKeyDown && !modifiers && activeDeadKey != 0) {
// a dead key was completed
_EnqueueInlineInputMethod(B_INPUT_METHOD_CHANGED,
string, true, msg);
activeDeadKey = 0;
if (fInputMethodStarted) {
_EnqueueInlineInputMethod(B_INPUT_METHOD_CHANGED,
string, true, msg);
_EnqueueInlineInputMethod(B_INPUT_METHOD_STOPPED);
fInputMethodStarted = false;
} else if (fOwner->EnqueueMessage(msg) != B_OK)
delete msg;
} else if (fOwner->EnqueueMessage(msg) != B_OK)
delete msg;
} else if (isKeyDown) {
@@ -773,18 +778,10 @@ KeyboardDevice::_ControlThread()
if (_EnqueueInlineInputMethod(B_INPUT_METHOD_CHANGED, string) == B_OK)
fInputMethodStarted = true;
activeDeadKey = newDeadKey;
}
}
if (!isKeyDown && !modifiers) {
if (activeDeadKey != 0) {
_EnqueueInlineInputMethod(B_INPUT_METHOD_STOPPED);
fInputMethodStarted = false;
}
activeDeadKey = newDeadKey;
}
lastKeyCode = isKeyDown ? keycode : 0;
}