mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user