Skip to content

Commit

Permalink
#30 Add support for "Ukrainian" and "Ukrainian-QWERTY" on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Seredkin committed Nov 6, 2024
1 parent b49270e commit f69a5b1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@


## [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.


## [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.

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
)

0 comments on commit f69a5b1

Please sign in to comment.