From 48664ebc05570639a265afcb1014f1adf317aae9 Mon Sep 17 00:00:00 2001 From: jonylee1986 <2532487686@qq.com> Date: Tue, 25 Apr 2023 11:04:44 +0800 Subject: [PATCH] add DISABLE_M2_KEYCODES --- keyboards/monsgeek/m2/config.h | 1 + keyboards/monsgeek/m2/m2.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/monsgeek/m2/config.h b/keyboards/monsgeek/m2/config.h index 4f1efe4cab5..53b08b15be0 100644 --- a/keyboards/monsgeek/m2/config.h +++ b/keyboards/monsgeek/m2/config.h @@ -88,3 +88,4 @@ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 /* The maximum brightness level */ +//#define DISABLE_M2_KEYCODES /*if you need to change or restore the default QMK button function, please open it*/ \ No newline at end of file diff --git a/keyboards/monsgeek/m2/m2.c b/keyboards/monsgeek/m2/m2.c index 5d552de6820..6cf65c7b5bb 100644 --- a/keyboards/monsgeek/m2/m2.c +++ b/keyboards/monsgeek/m2/m2.c @@ -345,6 +345,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return false; } switch (keycode) { +#ifndef DISABLE_M2_KEYCODES case MO(WIN_FN): case MO(MAC_FN): fn_make_flag = record->event.pressed; @@ -494,7 +495,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { } } return false; - +#endif//DISABLE_M2_KEYCODES default: return true; }