aboutsummaryrefslogtreecommitdiff
path: root/docs/keymap.md
diff options
context:
space:
mode:
authornoroadsleft <xxiinophobia@yahoo.com>2019-02-21 15:24:44 -0800
committerDrashna Jaelre <drashna@live.com>2019-02-21 23:19:26 -0800
commit384fef72d3a08f6bdc4e8557caf0bb78953dab32 (patch)
tree547202f9e3be33692c5c49920c176e5f4f057396 /docs/keymap.md
parent8a2346eda1e9fbdec71adf023a1337d5536fe1fa (diff)
downloadqmk_firmware-384fef72d3a08f6bdc4e8557caf0bb78953dab32.tar.gz
qmk_firmware-384fef72d3a08f6bdc4e8557caf0bb78953dab32.zip
Replace instances of KEYMAP with LAYOUT
Many instances in the QMK Docs referenced KEYMAP macros, which is outdated terminology. Replaced most instances of KEYMAP with LAYOUT, to reflect the desired usage.
Diffstat (limited to 'docs/keymap.md')
-rw-r--r--docs/keymap.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/keymap.md b/docs/keymap.md
index 382a0e911..49e6654a2 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -1,6 +1,6 @@
1# Keymap Overview 1# Keymap Overview
2 2
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 `LAYOUT()` macro to help you create this array of arrays.
4 4
5 5
6## Keymap and Layers 6## Keymap and Layers
@@ -119,7 +119,7 @@ The main part of this file is the `keymaps[]` definition. This is where you list
119 119
120 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 120 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
121 121
122After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer. 122After this you'll find a list of LAYOUT() macros. A LAYOUT() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
123 123
124`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard. 124`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard.
125 125
@@ -131,7 +131,7 @@ Here is an example of the Clueboard's base layer:
131 131
132 /* Keymap _BL: Base Layer (Default Layer) 132 /* Keymap _BL: Base Layer (Default Layer)
133 */ 133 */
134 [_BL] = KEYMAP( 134 [_BL] = LAYOUT(
135 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ 135 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
136 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ 136 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
137 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ 137 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
@@ -149,7 +149,7 @@ Some interesting things to note about this:
149 149
150Our function layer is, from a code point of view, no different from the base layer. Conceptually, however, you will build that layer as an overlay, not a replacement. For many people this distinction does not matter, but as you build more complicated layering setups it matters more and more. 150Our function layer is, from a code point of view, no different from the base layer. Conceptually, however, you will build that layer as an overlay, not a replacement. For many people this distinction does not matter, but as you build more complicated layering setups it matters more and more.
151 151
152 [_FL] = KEYMAP( 152 [_FL] = LAYOUT(
153 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ 153 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \
154 _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ 154 _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \
155 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ 155 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \