Skip to content

Latest commit

 

History

History
86 lines (60 loc) · 3.44 KB

README.md

File metadata and controls

86 lines (60 loc) · 3.44 KB

zmk-keymap-utils

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.

Getting started

Dependencies

  • West-based build supporting modules
  • zmk-helpers (Version 2)

Installation

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.

Basic usage

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>

Inspiration

License

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:

Inspiration

In adition to the projects mentioned in the License, this project is inspired by other zmk-config projects and their configuration: