Revert "8230926: [macosx] Two apostrophes are entered instead of one with "U.S. International - PC" layout"

This reverts commit 5049cad2b0.

After JBR-5173 this workaround is no longer necessary
This commit is contained in:
Nikita Tsarev
2023-02-09 13:08:37 +01:00
committed by jbrbot
parent 18c4329c5b
commit b403e715fe
2 changed files with 2 additions and 22 deletions

View File

@@ -237,11 +237,8 @@ final class CPlatformResponder {
// generation in such case to avoid uppercase letters in text components.
LWCToolkit lwcToolkit = (LWCToolkit)Toolkit.getDefaultToolkit();
if (testChar != KeyEvent.CHAR_UNDEFINED &&
((lwcToolkit.getLockingKeyState(KeyEvent.VK_CAPS_LOCK) &&
Locale.SIMPLIFIED_CHINESE.equals(lwcToolkit.getDefaultKeyboardLocale())) ||
(LWCToolkit.isLocaleUSInternationalPC(lwcToolkit.getDefaultKeyboardLocale()) &&
LWCToolkit.isCharModifierKeyInUSInternationalPC(testChar) &&
(testChar != testCharIgnoringModifiers)))) {
lwcToolkit.getLockingKeyState(KeyEvent.VK_CAPS_LOCK) &&
Locale.SIMPLIFIED_CHINESE.equals(lwcToolkit.getDefaultKeyboardLocale())) {
testChar = testCharIgnoringModifiers;
}

View File

@@ -961,23 +961,6 @@ public final class LWCToolkit extends LWToolkit {
return locale;
}
public static boolean isLocaleUSInternationalPC(Locale locale) {
return (locale != null ?
locale.toString().equals("_US_UserDefined_15000") : false);
}
public static boolean isCharModifierKeyInUSInternationalPC(char ch) {
// 5 characters: APOSTROPHE, QUOTATION MARK, ACCENT GRAVE, SMALL TILDE,
// CIRCUMFLEX ACCENT
final char[] modifierKeys = {'\'', '"', '`', '\u02DC', '\u02C6'};
for (char modKey : modifierKeys) {
if (modKey == ch) {
return true;
}
}
return false;
}
@Override
public InputMethodDescriptor getInputMethodAdapterDescriptor() {
if (sInputMethodDescriptor == null)