aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Young <gabeplaysdrums@live.com>2017-02-25 19:37:33 -0800
committerGabriel Young <gabeplaysdrums@live.com>2017-02-25 19:37:33 -0800
commitea14ed122fb5c1b3be5f5d6edda9b39b151692e5 (patch)
tree8b5e1ca50aacbbbcb92adc5e617b71030c1523e9
parent1000799d1ef594bf9f48076986ec300ef9e536db (diff)
downloadqmk_firmware-ea14ed122fb5c1b3be5f5d6edda9b39b151692e5.tar.gz
qmk_firmware-ea14ed122fb5c1b3be5f5d6edda9b39b151692e5.zip
Add basic layer to sample MIDI keycap
-rw-r--r--keyboards/satan/keymaps/midi/keymap.c23
-rw-r--r--quantum/process_keycode/process_audio.c2
-rw-r--r--quantum/process_keycode/process_music.c3
3 files changed, 25 insertions, 3 deletions
diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c
index 349391c3b..8378b4e4b 100644
--- a/keyboards/satan/keymaps/midi/keymap.c
+++ b/keyboards/satan/keymaps/midi/keymap.c
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL), 33 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL),
34 34
35#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) 35#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)
36/* Keymap _ML: MIDI Layer 36/* Keymap _ML: MIDI Layer (Advanced)
37 * ,------------------------------------------------------------------------. 37 * ,------------------------------------------------------------------------.
38 * | Exit | | | | | | | | | | | | | | 38 * | Exit | | | | | | | | | | | | | |
39 * |------------------------------------------------------------------------| 39 * |------------------------------------------------------------------------|
@@ -52,5 +52,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
52 MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \ 52 MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \
53 MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \ 53 MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \
54 _______, _______, _______, MI_ALLOFF, _______, _______, _______, _______), 54 _______, _______, _______, MI_ALLOFF, _______, _______, _______, _______),
55#elif defined(MIDI_ENABLE) && defined(MIDI_BASIC)
56/* Keymap _ML: MIDI Layer (Advanced)
57 * ,------------------------------------------------------------------------.
58 * | Exit | | | | | | | | | | | | | |
59 * |------------------------------------------------------------------------|
60 * | | | | | | | | | | | | | | |
61 * |------------------------------------------------------------------------|
62 * | | | | | | | | | | | | | |
63 * |------------------------------------------------------------------------|
64 * | |MuOn|MuOf|MiOn|MiOf| | | | | | | |
65 * |------------------------------------------------------------------------|
66 * | | | | | | | | |
67 * `------------------------------------------------------------------------'
68 */
69
70[_ML] = KEYMAP_ANSI(
71 TG(_ML), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
72 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
74 _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, \
75 _______, _______, _______, _______, _______, _______, _______, _______),
55#endif 76#endif
56}; \ No newline at end of file 77}; \ No newline at end of file
diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c
index 5b5da546e..d45242c9e 100644
--- a/quantum/process_keycode/process_audio.c
+++ b/quantum/process_keycode/process_audio.c
@@ -28,7 +28,7 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) {
28 { 28 {
29 audio_on(); 29 audio_on();
30 } 30 }
31 return false; 31 return false;
32 } 32 }
33 33
34 if (keycode == MUV_IN && record->event.pressed) { 34 if (keycode == MUV_IN && record->event.pressed) {
diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c
index a1e270df1..43bcf973e 100644
--- a/quantum/process_keycode/process_music.c
+++ b/quantum/process_keycode/process_music.c
@@ -142,7 +142,8 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
142 if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through 142 if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through
143 return false; 143 return false;
144 } 144 }
145 return true; 145
146 return true;
146} 147}
147 148
148bool is_music_on(void) { 149bool is_music_on(void) {