diff options
| author | Nick Brassel | 2025-09-06 09:55:23 +0200 |
|---|---|---|
| committer | Nick Brassel | 2025-09-06 09:55:23 +0200 |
| commit | 0188038bc0cfecdd6d413086634af4e5806c1ad7 (patch) | |
| tree | 03bdd000530476ef4fc9e1242d62022405df21e7 /quantum/process_keycode/process_oneshot.c | |
| parent | 1a58fce043e7f2e2b938dee03945dabc29e48d73 (diff) | |
| parent | 2a4b9f79fd32a41fd157cba83293ece995523b45 (diff) | |
Merge branch 'develop'
Diffstat (limited to 'quantum/process_keycode/process_oneshot.c')
| -rw-r--r-- | quantum/process_keycode/process_oneshot.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_oneshot.c b/quantum/process_keycode/process_oneshot.c new file mode 100644 index 0000000000..6c43da1011 --- /dev/null +++ b/quantum/process_keycode/process_oneshot.c @@ -0,0 +1,25 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "process_oneshot.h" +#include "action_util.h" + +bool process_oneshot(uint16_t keycode, keyrecord_t *record) { +#ifndef NO_ACTION_ONESHOT + if (record->event.pressed) { + switch (keycode) { + case QK_ONE_SHOT_TOGGLE: + oneshot_toggle(); + return false; + case QK_ONE_SHOT_ON: + oneshot_enable(); + return false; + case QK_ONE_SHOT_OFF: + oneshot_disable(); + return false; + } + } +#endif + + return true; +} |