summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keycodes.h39
-rw-r--r--quantum/process_keycode/process_haptic.c26
-rw-r--r--quantum/quantum_keycodes_legacy.h14
3 files changed, 53 insertions, 26 deletions
diff --git a/quantum/keycodes.h b/quantum/keycodes.h
index deb3565262..2b81261519 100644
--- a/quantum/keycodes.h
+++ b/quantum/keycodes.h
@@ -673,19 +673,19 @@ enum qk_keycode_defines {
QK_UNICODE_MODE_BSD = 0x7C35,
QK_UNICODE_MODE_WINCOMPOSE = 0x7C36,
QK_UNICODE_MODE_EMACS = 0x7C37,
- HPT_ON = 0x7C40,
- HPT_OFF = 0x7C41,
- HPT_TOG = 0x7C42,
- HPT_RST = 0x7C43,
- HPT_FBK = 0x7C44,
- HPT_BUZ = 0x7C45,
- HPT_MODI = 0x7C46,
- HPT_MODD = 0x7C47,
- HPT_CONT = 0x7C48,
- HPT_CONI = 0x7C49,
- HPT_COND = 0x7C4A,
- HPT_DWLI = 0x7C4B,
- HPT_DWLD = 0x7C4C,
+ QK_HAPTIC_ON = 0x7C40,
+ QK_HAPTIC_OFF = 0x7C41,
+ QK_HAPTIC_TOGGLE = 0x7C42,
+ QK_HAPTIC_RESET = 0x7C43,
+ QK_HAPTIC_FEEDBACK_TOGGLE = 0x7C44,
+ QK_HAPTIC_BUZZ_TOGGLE = 0x7C45,
+ QK_HAPTIC_MODE_NEXT = 0x7C46,
+ QK_HAPTIC_MODE_PREVIOUS = 0x7C47,
+ QK_HAPTIC_CONTINUOUS_TOGGLE = 0x7C48,
+ QK_HAPTIC_CONTINUOUS_UP = 0x7C49,
+ QK_HAPTIC_CONTINUOUS_DOWN = 0x7C4A,
+ QK_HAPTIC_DWELL_UP = 0x7C4B,
+ QK_HAPTIC_DWELL_DOWN = 0x7C4C,
QK_COMBO_ON = 0x7C50,
QK_COMBO_OFF = 0x7C51,
QK_COMBO_TOGGLE = 0x7C52,
@@ -1229,6 +1229,19 @@ enum qk_keycode_defines {
UC_BSD = QK_UNICODE_MODE_BSD,
UC_WINC = QK_UNICODE_MODE_WINCOMPOSE,
UC_EMAC = QK_UNICODE_MODE_EMACS,
+ HF_ON = QK_HAPTIC_ON,
+ HF_OFF = QK_HAPTIC_OFF,
+ HF_TOGG = QK_HAPTIC_TOGGLE,
+ HF_RST = QK_HAPTIC_RESET,
+ HF_FDBK = QK_HAPTIC_FEEDBACK_TOGGLE,
+ HF_BUZZ = QK_HAPTIC_BUZZ_TOGGLE,
+ HF_NEXT = QK_HAPTIC_MODE_NEXT,
+ HF_PREV = QK_HAPTIC_MODE_PREVIOUS,
+ HF_CONT = QK_HAPTIC_CONTINUOUS_TOGGLE,
+ HF_CONU = QK_HAPTIC_CONTINUOUS_UP,
+ HF_COND = QK_HAPTIC_CONTINUOUS_DOWN,
+ HF_DWLU = QK_HAPTIC_DWELL_UP,
+ HF_DWLD = QK_HAPTIC_DWELL_DOWN,
CM_ON = QK_COMBO_ON,
CM_OFF = QK_COMBO_OFF,
CM_TOGG = QK_COMBO_TOGGLE,
diff --git a/quantum/process_keycode/process_haptic.c b/quantum/process_keycode/process_haptic.c
index 0f07f9ac75..21d4c5ce30 100644
--- a/quantum/process_keycode/process_haptic.c
+++ b/quantum/process_keycode/process_haptic.c
@@ -87,43 +87,43 @@ __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
- case HPT_ON:
+ case QK_HAPTIC_ON:
haptic_enable();
break;
- case HPT_OFF:
+ case QK_HAPTIC_OFF:
haptic_disable();
break;
- case HPT_TOG:
+ case QK_HAPTIC_TOGGLE:
haptic_toggle();
break;
- case HPT_RST:
+ case QK_HAPTIC_RESET:
haptic_reset();
break;
- case HPT_FBK:
+ case QK_HAPTIC_FEEDBACK_TOGGLE:
haptic_feedback_toggle();
break;
- case HPT_BUZ:
+ case QK_HAPTIC_BUZZ_TOGGLE:
haptic_buzz_toggle();
break;
- case HPT_MODI:
+ case QK_HAPTIC_MODE_NEXT:
haptic_mode_increase();
break;
- case HPT_MODD:
+ case QK_HAPTIC_MODE_PREVIOUS:
haptic_mode_decrease();
break;
- case HPT_DWLI:
+ case QK_HAPTIC_DWELL_UP:
haptic_dwell_increase();
break;
- case HPT_DWLD:
+ case QK_HAPTIC_DWELL_DOWN:
haptic_dwell_decrease();
break;
- case HPT_CONT:
+ case QK_HAPTIC_CONTINUOUS_TOGGLE:
haptic_toggle_continuous();
break;
- case HPT_CONI:
+ case QK_HAPTIC_CONTINUOUS_UP:
haptic_cont_increase();
break;
- case HPT_COND:
+ case QK_HAPTIC_CONTINUOUS_DOWN:
haptic_cont_decrease();
break;
}
diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h
index 04bf687561..305b89a569 100644
--- a/quantum/quantum_keycodes_legacy.h
+++ b/quantum/quantum_keycodes_legacy.h
@@ -268,6 +268,20 @@
#define MI_BENDD QK_MIDI_PITCH_BEND_DOWN
#define MI_BENDU QK_MIDI_PITCH_BEND_UP
+#define HPT_ON QK_HAPTIC_ON
+#define HPT_OFF QK_HAPTIC_OFF
+#define HPT_TOG QK_HAPTIC_TOGGLE
+#define HPT_RST QK_HAPTIC_RESET
+#define HPT_FBK QK_HAPTIC_FEEDBACK_TOGGLE
+#define HPT_BUZ QK_HAPTIC_BUZZ_TOGGLE
+#define HPT_MODI QK_HAPTIC_MODE_NEXT
+#define HPT_MODD QK_HAPTIC_MODE_PREVIOUS
+#define HPT_CONT QK_HAPTIC_CONTINUOUS_TOGGLE
+#define HPT_CONI QK_HAPTIC_CONTINUOUS_UP
+#define HPT_COND QK_HAPTIC_CONTINUOUS_DOWN
+#define HPT_DWLI QK_HAPTIC_DWELL_UP
+#define HPT_DWLD QK_HAPTIC_DWELL_DOWN
+
#define TERM_ON _Static_assert(false, "The Terminal feature has been removed from QMK. Please remove use of TERM_ON/TERM_OFF from your keymap.")
#define TERM_OFF _Static_assert(false, "The Terminal feature has been removed from QMK.. Please remove use of TERM_ON/TERM_OFF from your keymap.")
// #define RESET _Static_assert(false, "The RESET keycode has been removed from QMK.. Please remove use from your keymap.")