aboutsummaryrefslogtreecommitdiff
path: root/docs/understanding_qmk.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/understanding_qmk.md')
-rw-r--r--docs/understanding_qmk.md30
1 files changed, 13 insertions, 17 deletions
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index da622044c..e0c2ab7dc 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -29,7 +29,6 @@ Within `keyboard_task()` you'll find code to handle:
29* [Matrix Scanning](#matrix-scanning) 29* [Matrix Scanning](#matrix-scanning)
30* Mouse Handling 30* Mouse Handling
31* Serial Link(s) 31* Serial Link(s)
32* Visualizer
33* Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock) 32* Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock)
34 33
35#### Matrix Scanning 34#### Matrix Scanning
@@ -67,10 +66,10 @@ At the keyboard level we define a C macro (typically named `LAYOUT()`) which map
67 k30, k31, k32, k33, \ 66 k30, k31, k32, k33, \
68 k40, k42 \ 67 k40, k42 \
69) { \ 68) { \
70 { k00, k01, k02, k03, }, \ 69 { k00, k01, k02, k03 }, \
71 { k10, k11, k12, k13, }, \ 70 { k10, k11, k12, k13 }, \
72 { k20, k21, k22, KC_NO, }, \ 71 { k20, k21, k22, KC_NO }, \
73 { k30, k31, k32, k33, }, \ 72 { k30, k31, k32, k33 }, \
74 { k40, KC_NO, k42, KC_NO } \ 73 { k40, KC_NO, k42, KC_NO } \
75} 74}
76``` 75```
@@ -83,14 +82,15 @@ You can also use this macro to handle unusual matrix layouts, for example the [C
83 82
84At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this: 83At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this:
85 84
86``` 85```c
87const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 86const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
88[0] = LAYOUT( 87 [0] = LAYOUT(
89 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ 88 KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
90 KC_P7, KC_P8, KC_P9, KC_PPLS, \ 89 KC_P7, KC_P8, KC_P9, KC_PPLS,
91 KC_P4, KC_P5, KC_P6, \ 90 KC_P4, KC_P5, KC_P6,
92 KC_P1, KC_P2, KC_P3, KC_PENT, \ 91 KC_P1, KC_P2, KC_P3, KC_PENT,
93 KC_P0, KC_PDOT) 92 KC_P0, KC_PDOT
93 )
94} 94}
95``` 95```
96 96
@@ -124,7 +124,7 @@ And when our current scan completes it will look like this:
124} 124}
125``` 125```
126 126
127Comparing against our keymap we can see that the pressed key is KC_NLCK. From here we dispatch to the `process_record` set of functions. 127Comparing against our keymap we can see that the pressed key is `KC_NUM`. From here we dispatch to the `process_record` set of functions.
128 128
129<!-- FIXME: Magic happens between here and process_record --> 129<!-- FIXME: Magic happens between here and process_record -->
130 130
@@ -180,10 +180,6 @@ FIXME: This needs to be written
180 180
181FIXME: This needs to be written 181FIXME: This needs to be written
182 182
183#### Visualizer
184
185FIXME: This needs to be written
186
187#### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) 183#### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock)
188 184
189FIXME: This needs to be written 185FIXME: This needs to be written