kmk.consts: rename UnicodeModes => UnicodeMode

This brings this naming into consistency with both fellow consts in the
same file (ex. LeaderMode is singular) as well as the variables in which
the consts are usually used (usually a `Firmware.unicode_mode` attribute
in a keymap).
This commit is contained in:
Josh Klar
2018-12-04 17:03:13 -08:00
parent 84a3fa8a04
commit d6a0538009
9 changed files with 25 additions and 25 deletions

View File

@@ -63,7 +63,7 @@ You can further define a bunch of other stuff:
console. This is very rarely needed, but can provide very valuable information
if you need to open an issue.
- `unicode_mode` from `kmk.consts.UnicodeModes`, which defines the default
- `unicode_mode` from `kmk.consts.UnicodeMode`, which defines the default
operating system implementation to use for unicode sequences (see examples
below, or `unicode.md`. This can be changed after boot with a key (see
`keycodes.md`)
@@ -86,7 +86,7 @@ features:
```python
from kmk.boards.klarank import Firmware
from kmk.consts import UnicodeModes
from kmk.consts import UnicodeMode
from kmk.keycodes import KC
from kmk.keycodes import generate_leader_dictionary_seq as glds
from kmk.macros.simple import send_string
@@ -95,7 +95,7 @@ from kmk.macros.unicode import compile_unicode_string_sequences as cuss
keyboard = Firmware()
keyboard.debug_enabled = True
keyboard.unicode_mode = UnicodeModes.LINUX
keyboard.unicode_mode = UnicodeMode.LINUX
_______ = KC.TRNS
xxxxxxx = KC.NO

View File

@@ -16,16 +16,16 @@ Before using unicode mode, you will need to set your platform. This can be done
You can use both in cases where you want to use one operating system, but occasionally use another.
This allows you to change modes on the fly without having to change your keymap.
unicode_mode = UnicodeModes.LINUX
unicode_mode = UnicodeMode.LINUX
Or
keymap = [...KC.UC_MODE_LINUX,...]
### Unicode Modes:
On Linux IBUS is required, and on Windows, requires [WinCompose](https://github.com/samhocevar/wincompose)
- Linux : UnicodeModes.LINUX or UnicodeModes.IBUS
- Mac: UnicodeModes.MACOS or UnicodeModes.OSX or UnicodeModes.RALT
- Windows: UnicodeModes.WINC
- Linux : UnicodeMode.LINUX or UnicodeMode.IBUS
- Mac: UnicodeMode.MACOS or UnicodeMode.OSX or UnicodeMode.RALT
- Windows: UnicodeMode.WINC
A note for IBUS users on Linux. This mode is not enabled by default, and will need to be turned on for this to work.
This works on X11, though if you are on Wayland, or in some GTK apps, it MAY work, but is not supported.