diff options
Diffstat (limited to 'docs/custom_quantum_functions.md')
-rw-r--r-- | docs/custom_quantum_functions.md | 57 |
1 files changed, 2 insertions, 55 deletions
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 84ae589ed6..6eb144af76 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -57,7 +57,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // Play a tone when enter is pressed if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // Let QMK send the enter press/release events default: @@ -438,7 +438,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // Play a tone when enter is pressed if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // Let QMK send the enter press/release events case RGB_LYR: // This allows me to use underglow as layer indication, or as normal @@ -486,56 +486,3 @@ And you're done. The RGB layer indication will only work if you want it to. And * Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)` The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM. - -# Custom 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. - -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: - -```c -uint16_t get_tapping_term(uint16_t keycode) { - switch (keycode) { - case SFT_T(KC_SPC): - return TAPPING_TERM + 1250; - case LT(1, KC_GRV): - return 130; - default: - return TAPPING_TERM; - } -} -``` - -## 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 user level functions are useful here, so no need to mark them as such. |