Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 606 Bytes

Composite-key.md

File metadata and controls

24 lines (16 loc) · 606 Bytes

Valid version

0.9.10+

Description

A composite key reports multiple keycodes at once.

Usage

Let's say there is a five-keys pad. You can make the most useful (?) programming tool like this:

kbd.add_layer :default, %i(KC_SPACE CUT COPY PASTE KC_ENTER)
kbd.define_composite_key :CUT,   %i(KC_LCTL KC_X)
kbd.define_composite_key :COPY,  %i(KC_LCTL KC_C)
kbd.define_composite_key :PASTE, %i(KC_LCTL KC_V)

Instead, you can also write the equivalent keymap in this way:

kbd.add_layer :default, [ :KC_SPACE, %i(KC_LCTL KC_X), %i(KC_LCTL KC_C), %i(KC_LCTL KC_V), :KC_ENTER ]