summaryrefslogtreecommitdiff
path: root/docs/understanding_qmk.md
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-11-04 16:22:17 +1100
committerGitHub <noreply@github.com>2021-11-03 22:22:17 -0700
commitf529580860cf5a1de4afc10432f218a45daae17a (patch)
tree1d2fa041174f2586230ab831c05e5b56d8ba4f92 /docs/understanding_qmk.md
parentb06d9d822cfb72e0728b11711a333f2f5d3c631e (diff)
Basic keycode overhaul (#14726)
Diffstat (limited to 'docs/understanding_qmk.md')
-rw-r--r--docs/understanding_qmk.md25
1 files changed, 13 insertions, 12 deletions
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index 42a41fbe2a..e0c2ab7dc3 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -66,10 +66,10 @@ At the keyboard level we define a C macro (typically named `LAYOUT()`) which map
k30, k31, k32, k33, \
k40, k42 \
) { \
- { k00, k01, k02, k03, }, \
- { k10, k11, k12, k13, }, \
- { k20, k21, k22, KC_NO, }, \
- { k30, k31, k32, k33, }, \
+ { k00, k01, k02, k03 }, \
+ { k10, k11, k12, k13 }, \
+ { k20, k21, k22, KC_NO }, \
+ { k30, k31, k32, k33 }, \
{ k40, KC_NO, k42, KC_NO } \
}
```
@@ -82,14 +82,15 @@ You can also use this macro to handle unusual matrix layouts, for example the [C
At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this:
-```
+```c
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = LAYOUT(
- KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
- KC_P7, KC_P8, KC_P9, KC_PPLS, \
- KC_P4, KC_P5, KC_P6, \
- KC_P1, KC_P2, KC_P3, KC_PENT, \
- KC_P0, KC_PDOT)
+ [0] = LAYOUT(
+ KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_P4, KC_P5, KC_P6,
+ KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_P0, KC_PDOT
+ )
}
```
@@ -123,7 +124,7 @@ And when our current scan completes it will look like this:
}
```
-Comparing against our keymap we can see that the pressed key is KC_NLCK. From here we dispatch to the `process_record` set of functions.
+Comparing against our keymap we can see that the pressed key is `KC_NUM`. From here we dispatch to the `process_record` set of functions.
<!-- FIXME: Magic happens between here and process_record -->