* if a dead key sequence does not produce a special character as defined by
the dead key character map - both the dead key itself and the following character are being sent. R5 seems to do the same, at least the resulting behaviour in the terminal is now identical: e.g. if you press ^ once, you see nothing, if you press ^ a second time, you see '^^'. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30765 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -418,15 +418,19 @@ Keymap::GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey,
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if not found we return the current char mapped
|
// if not found we return the whole sequence (the dead key itself plus
|
||||||
*chars = new (std::nothrow) char[*numBytes + 1];
|
// the following char)
|
||||||
|
int32 deadKeyNumBytes = fChars[deadKey[1]];
|
||||||
|
int32 fullNumBytes = deadKeyNumBytes + *numBytes;
|
||||||
|
*chars = new (std::nothrow) char[fullNumBytes + 1];
|
||||||
if (*chars == NULL) {
|
if (*chars == NULL) {
|
||||||
*numBytes = 0;
|
*numBytes = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
strncpy(*chars, &fChars[deadKey[1] + 1], deadKeyNumBytes);
|
||||||
strncpy(*chars, &(fChars[offset + 1]), *numBytes );
|
strncpy(*chars + deadKeyNumBytes, &fChars[offset + 1], *numBytes);
|
||||||
(*chars)[*numBytes] = 0;
|
*numBytes = fullNumBytes;
|
||||||
|
(*chars)[fullNumBytes] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user