aboutsummaryrefslogtreecommitdiff
path: root/docs/faq_keymap.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/faq_keymap.md')
-rw-r--r--docs/faq_keymap.md21
1 files changed, 2 insertions, 19 deletions
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index 07d74d6cf..ae01e9387 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -11,8 +11,8 @@ Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_f
11 11
12There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here: 12There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
13 13
14<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/070a530eedaed36a2d77f3f6fd455677 --> 14<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/bf431647d1001cff5eff20ae55621e9a -->
15![Keyboard Layout Image](https://i.imgur.com/gvlNUpQ.png) 15![Keyboard Layout Image](https://i.imgur.com/5wsh5wM.png)
16 16
17## Some Of My Keys Are Swapped Or Not Working 17## Some Of My Keys Are Swapped Or Not Working
18 18
@@ -211,20 +211,3 @@ here real_mods lost state for 'physical left shift'.
211 211
212weak_mods is ORed with real_mods when keyboard report is sent. 212weak_mods is ORed with real_mods when keyboard report is sent.
213https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 213https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57
214
215## Timer Functionality
216
217It's possible to start timers and read values for time-specific events - here's an example:
218
219```c
220static uint16_t key_timer;
221key_timer = timer_read();
222
223if (timer_elapsed(key_timer) < 100) {
224 // do something if less than 100ms have passed
225} else {
226 // do something if 100ms or more have passed
227}
228```
229
230It's best to declare the `static uint16_t key_timer;` at the top of the file, outside of any code blocks you're using it in.