summaryrefslogtreecommitdiffstats
path: root/quantum/quantum_keycodes.h
diff options
context:
space:
mode:
authorGabriel Young <gabeplaysdrums@live.com>2017-02-26 05:41:13 +0100
committerGabriel Young <gabeplaysdrums@live.com>2017-02-26 05:41:13 +0100
commita64ae1066250d3aafb6e9670bf617237ec4338e7 (patch)
tree9d91360888e2f14c7d7fe84d0a821c629a7340d3 /quantum/quantum_keycodes.h
parentea14ed122fb5c1b3be5f5d6edda9b39b151692e5 (diff)
downloadqmk_firmware-a64ae1066250d3aafb6e9670bf617237ec4338e7.tar.gz
qmk_firmware-a64ae1066250d3aafb6e9670bf617237ec4338e7.tar.xz
Update existing keymaps
Update existing keymaps to enable MIDI_BASIC functionality. Also added an option MIDI_ENABLE_STRICT to be strict about keycode use (which also reduces memory footprint at runtime)
Diffstat (limited to 'quantum/quantum_keycodes.h')
-rw-r--r--quantum/quantum_keycodes.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 3b82b7208..56228f276 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -1,8 +1,11 @@
-
#ifndef QUANTUM_KEYCODES_H
#define QUANTUM_KEYCODES_H
-#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)
+#ifndef MIDI_ENABLE_STRICT
+#define MIDI_ENABLE_STRICT 0
+#endif
+
+#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
#ifndef MIDI_TONE_KEYCODE_OCTAVES
#define MIDI_TONE_KEYCODE_OCTAVES 3
#endif
@@ -113,18 +116,16 @@ enum quantum_keycodes {
MUV_IN,
MUV_DE,
-#ifdef MIDI_ENABLE
// Midi
-
-#ifdef MIDI_BASIC
+#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
MI_ON, // send midi notes when music mode is enabled
MI_OFF, // don't send midi notes when music mode is enabled
#endif
-#ifdef MIDI_ADVANCED
+#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
MIDI_TONE_MIN,
-#if MIDI_TONE_KEYCODE_OCTAVES > 0
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0
MI_C = MIDI_TONE_MIN,
MI_Cs,
MI_Db = MI_Cs,
@@ -144,7 +145,7 @@ enum quantum_keycodes {
MI_B,
#endif
-#if MIDI_TONE_KEYCODE_OCTAVES > 1
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1
MI_C_1,
MI_Cs_1,
MI_Db_1 = MI_Cs_1,
@@ -164,7 +165,7 @@ enum quantum_keycodes {
MI_B_1,
#endif
-#if MIDI_TONE_KEYCODE_OCTAVES > 2
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2
MI_C_2,
MI_Cs_2,
MI_Db_2 = MI_Cs_2,
@@ -184,7 +185,7 @@ enum quantum_keycodes {
MI_B_2,
#endif
-#if MIDI_TONE_KEYCODE_OCTAVES > 3
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3
MI_C_3,
MI_Cs_3,
MI_Db_3 = MI_Cs_3,
@@ -204,7 +205,7 @@ enum quantum_keycodes {
MI_B_3,
#endif
-#if MIDI_TONE_KEYCODE_OCTAVES > 4
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4
MI_C_4,
MI_Cs_4,
MI_Db_4 = MI_Cs_4,
@@ -224,7 +225,7 @@ enum quantum_keycodes {
MI_B_4,
#endif
-#if MIDI_TONE_KEYCODE_OCTAVES > 5
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
MI_C_5,
MI_Cs_5,
MI_Db_5 = MI_Cs_5,
@@ -244,7 +245,7 @@ enum quantum_keycodes {
MI_B_5,
#endif
-#if MIDI_TONE_KEYCODE_OCTAVES > 5
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
MIDI_TONE_MAX = MI_B_5,
#elif MIDI_TONE_KEYCODE_OCTAVES > 4
MIDI_TONE_MAX = MI_B_4,
@@ -339,7 +340,6 @@ enum quantum_keycodes {
MI_MODSD, // decrease modulation speed
MI_MODSU, // increase modulation speed
#endif // MIDI_ADVANCED
-#endif // MIDI_ENABLE
// Backlight functionality
BL_0,