aboutsummaryrefslogtreecommitdiff
path: root/docs/keymap.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/keymap.md')
-rw-r--r--docs/keymap.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/keymap.md b/docs/keymap.md
index 092ea8678..96d4563c0 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -3,7 +3,7 @@
3QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays. 3QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays.
4 4
5 5
6## Keymap and layers 6## Keymap and Layers
7In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most. 7In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most.
8 8
9For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**. 9For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**.
@@ -27,7 +27,7 @@ Respective layers can be validated simultaneously. Layers are indexed with 0 to
27 27
28Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history. 28Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
29 29
30### Keymap layer status 30### Keymap Layer Status
31The state of the Keymap layer is determined by two 32 bit parameters: 31The state of the Keymap layer is determined by two 32 bit parameters:
32 32
33* **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer). 33* **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer).
@@ -75,7 +75,7 @@ Note that ***higher layer has higher priority on stack of layers***, namely firm
75You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer. 75You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
76Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead. 76Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
77 77
78## Anatomy Of A `keymap.c` 78## Anatomy of a `keymap.c`
79 79
80For this example we will walk through an [older version of the default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/ca01d94005f67ec4fa9528353481faa622d949ae/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context. 80For this example we will walk through an [older version of the default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/ca01d94005f67ec4fa9528353481faa622d949ae/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
81 81