Skip to content

Commit 5428f26

Browse files
author
Martin Fox
committed
8340982: [win] Dead key followed by Space generates two characters instead of one
Reviewed-by: angorya, jhendrikx
1 parent 7870a22 commit 5428f26

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

modules/javafx.graphics/src/main/native-glass/win/ViewContainer.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,14 @@ void ViewContainer::HandleViewTypedEvent(HWND hwnd, UINT msg, WPARAM wParam, LPA
669669
wChar = (jchar)out[0];
670670

671671
if (res == 3) {
672-
// The character cannot be accented, so we send a TYPED event
673-
// for the dead key itself first.
674-
SendViewTypedEvent(1, (jchar)m_deadKeyWParam);
672+
// The character cannot be accented. If it's a Space
673+
// we send out the dead key only. Otherwise we send
674+
// out the dead key followed by the character.
675+
if (wChar == 0x20) {
676+
wChar = m_deadKeyWParam;
677+
} else {
678+
SendViewTypedEvent(1, (jchar)m_deadKeyWParam);
679+
}
675680
}
676681
} else {
677682
// Folding failed. Use the untranslated original character then

0 commit comments

Comments
 (0)