Cross-platform library for detecting keyboard layouts and languages on Windows, macOS, and Linux.
- 🖥️ Supported Operating Systems: Available on Windows, Mac, and Linux.
- 🌐 Supported Languages And Input Methods: Supports multiple languages and input methods, including Sogou Pinyin Method (Chinese) for macOS.
- ⚡ Lightweight and easy to use
Add the following dependency to your build.gradle
file:
dependencies {
implementation 'io.github.siropkin.keyboard-layout:1.0.2'
}
import io.github.siropkin.keyboardLayout.*
val keyboardLayout = KeyboardLayout()
val keyboardLayoutInfo = keyboardLayout.getInfo()
println("Layout: ${keyboardLayoutInfo.toString()}, Language: ${keyboardLayoutInfo.language}, Country: ${keyboardLayoutInfo.country}, Variant: ${keyboardLayoutInfo.variant}")
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Made with ❤️ by Ivan Seredkin