diff --git a/CHANGELOG.md b/CHANGELOG.md index e37ded2..e0965a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ## [1.4.2] +### Changed +- #30 Add support for "Ukrainian" and "Ukrainian-QWERTY" on macOS. + ### Fixed - #28 Fix "Do not call invokeLater when app is not yet fully initialized" error on startup. - #29 Fix "Migrate com.github.siropkin.kursor.KursorStartupActivity to ProjectActivity" development warning on startup. @@ -11,7 +14,7 @@ ## [1.4.1] ### Changed -- #18 Add support for "Squirrel Method" (Chinese) (https://rime.im) on macOS. +- #18 Add support for [Squirrel](https://rime.im) method (Zhuyin) on macOS. - #20 Add support for "Russian - PC" on macOS. - #21 Fix color settings save bug; color settings now save correctly. @@ -30,7 +33,7 @@ Version skipped due to a mistake in the release process. ## [1.3.0] - 2024-07-31 ### Changed -- Add support of Sogou Pinyin Method (Chinese) for macOS. +- Add support of [Sogou Pinyin](https://pinyin.sogou.com/mac) method (Zhuyin) for macOS. ### For Contributors and Developers - Migrate from Gradle IntelliJ Plugin 1.x to 2.0. diff --git a/README.md b/README.md index 83b18f4..416b4e8 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ This feature is particularly beneficial for developers juggling multiple languag - **🔒 Caps Lock Indicator:** Shows the Caps Lock status on the cursor. - **🔧 Customization:** Customize the language indicator's font, size, opacity, and position. - **🖥️ Supported Operating Systems:** Available on Windows, Mac, and Linux. -- **🌐 Supported Languages And Input Methods:** Supports a wide range of languages and input methods, including [Sogou Pinyin](https://pinyin.sogou.com/mac) and [Squirrel](https://rime.im) Chinese methods on macOS. +- **🌐 Supported Languages And Input Methods:** Supports a wide range of languages and input methods, including [Sogou Pinyin](https://pinyin.sogou.com/mac) and [Squirrel](https://rime.im) Zhuyin methods on macOS. ## Usage diff --git a/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/KeyboardLayout.kt b/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/KeyboardLayout.kt index ec9e3f1..ab76fef 100644 --- a/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/KeyboardLayout.kt +++ b/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/KeyboardLayout.kt @@ -122,7 +122,8 @@ class KeyboardLayout { private fun getMacLayoutInfo(): KeyboardLayoutInfo { val locale = InputContext.getInstance().locale - val variant = MacKeyboardVariants[locale.variant] ?: "" // variant example for US: UserDefined_252 + // Variant example for US: UserDefined_252 + val variant = MacKeyboardVariants[locale.variant] ?: "" return KeyboardLayoutInfo(locale.language, locale.country, variant) } diff --git a/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/MacKeyboardVariants.kt b/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/MacKeyboardVariants.kt index 4d22386..1ea4754 100644 --- a/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/MacKeyboardVariants.kt +++ b/src/main/kotlin/com/github/siropkin/kursor/keyboardlayout/MacKeyboardVariants.kt @@ -1,9 +1,14 @@ package com.github.siropkin.kursor.keyboardlayout +// https://github.com/acidanthera/OpenCorePkg/blob/master/Utilities/AppleKeyboardLayouts/AppleKeyboardLayouts.txt val MacKeyboardVariants = mapOf( - "UserDefined_19458" to "RU", // Russian - "UserDefined_com.sogou.inputmethod.pinyin" to "ZH", // Sogou Pinyin: https://pinyin.sogou.com/mac - "UserDefined_im.rime.inputmethod.Squirrel.Hans" to "ZH", // Squirrel - Simplified: https://rime.im - "UserDefined_im.rime.inputmethod.Squirrel.Hant" to "ZH" // Squirrel - Traditional: https://rime.im + // Standard layouts + "UserDefined_19458" to "RU", // Russian - PC + "UserDefined_-23205" to "UK", // Ukrainian-QWERTY + "UserDefined_-2354" to "UK", // Ukrainian + // Additional layouts + "UserDefined_com.sogou.inputmethod.pinyin" to "ZH", // Zhuyin, Sogou Pinyin: https://pinyin.sogou.com/mac + "UserDefined_im.rime.inputmethod.Squirrel.Hans" to "ZH", // Zhuyin , Squirrel - Simplified: https://rime.im + "UserDefined_im.rime.inputmethod.Squirrel.Hant" to "ZH" // Zhuyin, Squirrel - Traditional: https://rime.im )