Welcome to the documentation for KeyboardLayoutHelper! This library provides a convenient way to work with keyboard layout information in iOS apps.
Installation
To install KeyboardLayoutHelper, you have a couple of options:
- Using Cocoapods: Add
pod 'KeyboardLayoutHelper'
to your Podfile and runpod install
. - Manual installation: Download the latest release from the GitHub repository and add the provided framework to your project.
Usage
Once you have installed the KeyboardLayoutHelper library, you can start utilizing its functionalities in your iOS app:
Import the library
To use KeyboardLayoutHelper, import it in your Swift file:
import KeyboardLayoutHelper
Retrieve the current keyboard layout
You can easily obtain the current keyboard layout using the following code:
let currentLayout = KeyboardLayoutHelper.currentLayout
Check if a layout is available
If you wish to determine if a particular keyboard layout is available, you can use the following method:
let isAvailable = KeyboardLayoutHelper.isLayoutAvailable(.azerty)
Switch to a different keyboard layout
If you need to programmatically switch to a different keyboard layout, you can do so with the following code:
KeyboardLayoutHelper.switchToLayout(.dvorak)
Supported Keyboard Layouts
The following keyboard layouts are currently supported by KeyboardLayoutHelper:
- Azerty
- Qwerty
- Dvorak
- Colemak
- Workman
Contribute
If you would like to contribute to KeyboardLayoutHelper, feel free to submit a pull request on the GitHub repository. We appreciate your help in making this library even better!
License
KeyboardLayoutHelper is available under the MIT license. See the LICENSE file for more information.