aboutsummaryrefslogtreecommitdiff
path: root/docs/keymap.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/keymap.md')
-rw-r--r--docs/keymap.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/keymap.md b/docs/keymap.md
index 96d4563c0..8401ee148 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -35,8 +35,8 @@ The state of the Keymap layer is determined by two 32 bit parameters:
35 35
36Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty. 36Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty.
37 37
38 Initial state of Keymap Change base layout 38 Initial state of Keymap Change base layout
39 ----------------------- ------------------ 39 ----------------------- ------------------
40 40
41 31 31 41 31 31
42 30 30 42 30 30
@@ -98,7 +98,7 @@ At the top of the file you'll find this:
98 // Each layer gets a name for readability. 98 // Each layer gets a name for readability.
99 // The underscores don't mean anything - you can 99 // The underscores don't mean anything - you can
100 // have a layer called STUFF or any other name. 100 // have a layer called STUFF or any other name.
101 // Layer names don't all need to be of the same 101 // Layer names don't all need to be of the same
102 // length, and you can also skip them entirely 102 // length, and you can also skip them entirely
103 // and just use numbers. 103 // and just use numbers.
104 #define _BL 0 104 #define _BL 0
@@ -113,9 +113,9 @@ The main part of this file is the `keymaps[]` definition. This is where you list
113 113
114 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 114 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
115 115
116After 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. 116After 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.
117 117
118`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. 118`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.
119 119
120> TMK from which QMK was forked uses `const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]` instead and holds the 8 bit keycode. Some keycode values are reserved to induce execution of certain action codes via the `fn_actions[]` array. 120> TMK from which QMK was forked uses `const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]` instead and holds the 8 bit keycode. Some keycode values are reserved to induce execution of certain action codes via the `fn_actions[]` array.
121 121
@@ -153,11 +153,11 @@ Our function layer is, from a code point of view, no different from the base lay
153Some interesting things to note: 153Some interesting things to note:
154 154
155* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer. 155* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
156* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer. 156* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
157 157
158### Custom Functions 158### Custom Functions
159 159
160At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them. 160At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
161 161
162#### `fn_actions[]` 162#### `fn_actions[]`
163 163