aboutsummaryrefslogtreecommitdiffstats
path: root/docs/custom_quantum_functions.md
diff options
context:
space:
mode:
authorzk-phi <zk-phi@users.noreply.github.com>2020-01-10 16:48:06 +0900
committerridingqwerty <george.g.koenig@gmail.com>2020-01-10 02:48:06 -0500
commit7f388b65530b06779089be6cb4ddc56b2ecb36ff (patch)
tree19cf455d8ca3ae379304ea212d5b3d85917137b9 /docs/custom_quantum_functions.md
parente34af631c2c4b0c9406dead907bf74b460ee9f7f (diff)
downloadfirmware-7f388b65530b06779089be6cb4ddc56b2ecb36ff.tar.gz
firmware-7f388b65530b06779089be6cb4ddc56b2ecb36ff.tar.bz2
firmware-7f388b65530b06779089be6cb4ddc56b2ecb36ff.zip
Add per-key IGNORE_MOD_TAP_INTERRUPT feature (#7838)
* Implement IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add configurable option IGNORE_MOD_TAP_INTERRUPT_PER_KEY - Add function get_ignore_mod_tap_interrupt iff the option is enabled Unless IGNORE_MOD_TAP_INTERRUPT_PER_KEY is defined, this patch does not affect the resulting binary. * Add documentation for IGNORE_MOD_TAP_INTERRUPT_PER_KEY
Diffstat (limited to 'docs/custom_quantum_functions.md')
-rw-r--r--docs/custom_quantum_functions.md35
1 files changed, 30 insertions, 5 deletions
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 71a30bc7c..9c8f89ae1 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -489,14 +489,24 @@ The `val` is the value of the data that you want to write to EEPROM. And the `e
# Custom Tapping Term
-By default, the tapping term is defined globally, and is not configurable by key. For most users, this is perfectly fine. But in come cases, dual function keys would be greatly improved by different timeouts than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable `TAPPING_TERM`.
+By default, the tapping term and related options (such as `IGNORE_MOD_TAP_INTERRUPT`) are defined globally, and are not configurable by key. For most users, this is perfectly fine. But in some cases, dual function keys would be greatly improved by different timeout behaviors than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable timeout behaviors.
-To enable this functionality, you need to add `#define TAPPING_TERM_PER_KEY` to your `config.h`, first.
+There are two configurable options to control per-key timeout behaviors:
+
+- `TAPPING_TERM_PER_KEY`
+- `IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
+
+You need to add `#define` lines to your `config.h` for each feature you want.
+
+```
+#define TAPPING_TERM_PER_KEY
+#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
+```
## Example `get_tapping_term` Implementation
-To change the `TAPPING TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file:
+To change the `TAPPING_TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file:
```c
uint16_t get_tapping_term(uint16_t keycode) {
@@ -511,6 +521,21 @@ uint16_t get_tapping_term(uint16_t keycode) {
}
```
-### `get_tapping_term` Function Documentation
+## Example `get_ignore_mod_tap_interrupt` Implementation
+
+To change the `IGNORE_MOD_TAP_INTERRUPT` value based on the keycode, you'd want to add something like the following to your `keymap.c` file:
+
+```c
+bool get_ignore_mod_tap_interrupt(uint16_t keycode) {
+ switch (keycode) {
+ case SFT_T(KC_SPC):
+ return true;
+ default:
+ return false;
+ }
+}
+```
+
+## `get_tapping_term` / `get_ignore_mod_tap_interrupt` Function Documentation
-Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only a user level function is useful here, so no need to mark it as such.
+Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only user level functions are useful here, so no need to mark them as such.