From 8d55a12a9538742f510087f14fc59eb813b2ef42 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Tue, 8 Mar 2016 08:48:43 +0100 Subject: Document the issue of stuck modifiers --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 6a6bbed40b..d8dfd7c2bc 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,26 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac `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 + +Warning: This option uses up 2 bytes of memory per key. For example on +Planck it uses 2\*4\*12=96 bytes. + ### Remember: These are just aliases These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). -- cgit v1.2.1 From 36103edb7dcfce4497672130625b47712d076a42 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Mon, 28 Mar 2016 00:25:43 +0200 Subject: Update the memory consumption of PREVENT_STUCK_MODIFIERS in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index d8dfd7c2bc..083880b4e2 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,8 @@ If such situation bothers you add this to your `config.h`: #define PREVENT_STUCK_MODIFIERS -Warning: This option uses up 2 bytes of memory per key. For example on -Planck it uses 2\*4\*12=96 bytes. +Warning: This option uses up 1 byte of memory per key. For example on +Planck it uses 4\*12=96 bytes. ### Remember: These are just aliases -- cgit v1.2.1 From 1a09e96b9558f3d08394ec50546cfb366271f014 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Mon, 28 Mar 2016 10:05:42 +0200 Subject: Update the memory consumption total value in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 083880b4e2..dc5f612f67 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ If such situation bothers you add this to your `config.h`: #define PREVENT_STUCK_MODIFIERS Warning: This option uses up 1 byte of memory per key. For example on -Planck it uses 4\*12=96 bytes. +Planck it uses 4\*12=48 bytes. ### Remember: These are just aliases -- cgit v1.2.1 From 8ef14d09b8451b3f2a77e6f019922eae0ac43642 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sat, 2 Apr 2016 19:45:02 +0200 Subject: Update PREVENT_STUCK_MODIFIERS documentation in README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index dc5f612f67..82b2771652 100644 --- a/README.md +++ b/README.md @@ -115,8 +115,9 @@ If such situation bothers you add this to your `config.h`: #define PREVENT_STUCK_MODIFIERS -Warning: This option uses up 1 byte of memory per key. For example on -Planck it uses 4\*12=48 bytes. +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. ### Remember: These are just aliases -- cgit v1.2.1