summaryrefslogtreecommitdiffstats
path: root/Home.md
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2017-02-17 01:34:35 +0100
committerskullydazed <skullydazed@users.noreply.github.com>2017-02-17 01:34:35 +0100
commitb5af4e6ddac1beaf0f1df393693e0d67712d89be (patch)
tree74fef6654d408df6337967fba2864b2b4b03882c /Home.md
parentc23a2fc928c1151a8d502ddf91be312ac8beb7c5 (diff)
downloadqmk_firmware-b5af4e6ddac1beaf0f1df393693e0d67712d89be.tar.gz
qmk_firmware-b5af4e6ddac1beaf0f1df393693e0d67712d89be.tar.xz
Updated Home (markdown)
Diffstat (limited to 'Home.md')
-rw-r--r--Home.md42
1 files changed, 21 insertions, 21 deletions
diff --git a/Home.md b/Home.md
index f73690518..85e384403 100644
--- a/Home.md
+++ b/Home.md
@@ -236,6 +236,27 @@ For a value of `4` for this imaginary setting. So we `undef` it first, then `def
You can then override any settings, rather than having to copy and paste the whole thing.
+### Prevent stuck modifiers
+
+Consider the following scenario:
+
+1. Layer 0 has a key defined as Shift.
+2. The same key is defined on layer 1 as the letter A.
+3. User presses Shift.
+4. User switches to layer 1 for whatever reason.
+5. User releases Shift, or rather the letter A.
+6. User switches back to layer 0.
+
+Shift was actually never released and is still considered pressed.
+
+If such situation bothers you add this to your `config.h`:
+
+ #define PREVENT_STUCK_MODIFIERS
+
+This option uses 5 bytes of memory per every 8 keys on the keyboard
+rounded up (5 bits per key). For example on Planck (48 keys) it uses
+(48/8)\*5 = 30 bytes.
+
# Going beyond the keycodes
Aside from the [basic keycodes](https://github.com/qmk/qmk_firmware/wiki/Keycodes), your keymap can include shortcuts to common operations.
@@ -260,27 +281,6 @@ Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a co
`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
-## Prevent stuck modifiers
-
-Consider the following scenario:
-
-1. Layer 0 has a key defined as Shift.
-2. The same key is defined on layer 1 as the letter A.
-3. User presses Shift.
-4. User switches to layer 1 for whatever reason.
-5. User releases Shift, or rather the letter A.
-6. User switches back to layer 0.
-
-Shift was actually never released and is still considered pressed.
-
-If such situation bothers you add this to your `config.h`:
-
- #define PREVENT_STUCK_MODIFIERS
-
-This option uses 5 bytes of memory per every 8 keys on the keyboard
-rounded up (5 bits per key). For example on Planck (48 keys) it uses
-(48/8)\*5 = 30 bytes.
-
## Macro shortcuts: Send a whole string when pressing just one key
Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c).