This is a collection of helper utilities to simplify the configuration of ZMK keymaps supporting different OS.
They are partly based on the amazing work by Sunaku and his glove80-keymaps project and uses the Urob's zmk-helpers module to make the implementation and maintenance easier.
- West-based build supporting modules
- zmk-helpers (Version 2)
To use zmk-keymap-utils
, you need to add it as a module to your west configuration with its required modules:
manifests:
remotes:
# zmk and other remotes might be configured
- name: magicDGS
url-base: https://github.com/magicDGS
- name: urob
url-base: https://github.com/urob
projects:
# zmk and other projects might be configured
- name: zmk-helpers
remote-name: urob
# pin version of the module
revision: v0.1
- name: zmk-keymap-utils
remote-name: magicDGS
# pin version of the module
revision: v0.3
Tip
We recommend to pin the version of the modules as shown in the example above.
Nevertheless, you can also use directly main
.
To build locally, check the ZMK documentation to build with external modules.
Note
The full documentation can be found on the documentation page.
Define the OPERATING_SYSTEM
variable with the operating system you intend to use with this keymap: L
for Linux (default if not provided), W
for Windows, M
for MacOS.
#define OPERATING_SYSTEM "L"
for Linux (default if none provided)#define OPERATING_SYSTEM "W"
for Windows#define OPERATING_SYSTEM "M"
for MacOS
Source the init.h
header before using any of the features of the zmk-keymap-utils
module on your .keymap
file to provide the initial keycodes and shortcuts for the specified OS.
// #define OPERATING_SYSTEM "L" // Linux (default) - uncomment to override with explicit values: L, W, M
#include <zmk-keymap-utils/init.h>
Then include any extra functionality you need:
// select-word macros based on the Sunaku's implementation of Pascal Getreuer's Select Word macro from QMK
#include <zmk-keymap-utils/select_word.dtsi>
// timeless home-row mods based on urob's implementation
#include <zmk-keymap-utils/hrm/timeless.dtsi>
This project is released under the ISC License.
It also contains copied or modified code from other Open Sourcethird-party projects, which can be found in the NOTICE.md file:
- sunaku/glove80-keymaps for initial implementation
- urob/zmk-helpers is required as a module to use this project.
In adition to the projects mentioned in the License, this project is inspired by other zmk-config projects and their configuration:
- urob/zmk-config, where it was firs described the configuration to implement Timeless homerow mods.