Relocate remaining process_record_quantum keycodes (#25328)
This commit is contained in:
parent
53c6fa5de7
commit
f096e5a3f3
7 changed files with 136 additions and 75 deletions
25
quantum/process_keycode/process_oneshot.c
Normal file
25
quantum/process_keycode/process_oneshot.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue