* 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++;
|
||||
}
|
||||
|
||||
// if not found we return the current char mapped
|
||||
*chars = new (std::nothrow) char[*numBytes + 1];
|
||||
// if not found we return the whole sequence (the dead key itself plus
|
||||
// the following char)
|
||||
int32 deadKeyNumBytes = fChars[deadKey[1]];
|
||||
int32 fullNumBytes = deadKeyNumBytes + *numBytes;
|
||||
*chars = new (std::nothrow) char[fullNumBytes + 1];
|
||||
if (*chars == NULL) {
|
||||
*numBytes = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
strncpy(*chars, &(fChars[offset + 1]), *numBytes );
|
||||
(*chars)[*numBytes] = 0;
|
||||
strncpy(*chars, &fChars[deadKey[1] + 1], deadKeyNumBytes);
|
||||
strncpy(*chars + deadKeyNumBytes, &fChars[offset + 1], *numBytes);
|
||||
*numBytes = fullNumBytes;
|
||||
(*chars)[fullNumBytes] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user