summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnte Laurijssen <antelaurijssen@gmail.com>2017-05-26 09:54:40 -0400
committerAnte Laurijssen <antelaurijssen@gmail.com>2017-05-26 09:54:40 -0400
commit6b1f707ce9431abfff6e6f8aa5730c77578fbc08 (patch)
tree3a96995e91857ea9052121b8b227cc526cf11c36
parentb4b06f81b5024bb5963753edfc07f9e2e0054cfd (diff)
Still working on these MIDI CHORDS!
-rw-r--r--keyboards/s60_x/keymaps/bluebear/Makefile4
-rw-r--r--keyboards/s60_x/keymaps/bluebear/keymap.c33
2 files changed, 11 insertions, 26 deletions
diff --git a/keyboards/s60_x/keymaps/bluebear/Makefile b/keyboards/s60_x/keymaps/bluebear/Makefile
index dfefad39da..a444eeb7f4 100644
--- a/keyboards/s60_x/keymaps/bluebear/Makefile
+++ b/keyboards/s60_x/keymaps/bluebear/Makefile
@@ -1,8 +1,8 @@
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = no # Commands for debug and configuration
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = yes # MIDI controls
diff --git a/keyboards/s60_x/keymaps/bluebear/keymap.c b/keyboards/s60_x/keymaps/bluebear/keymap.c
index 2dc7500cdd..0047a87d31 100644
--- a/keyboards/s60_x/keymaps/bluebear/keymap.c
+++ b/keyboards/s60_x/keymaps/bluebear/keymap.c
@@ -184,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│RESET│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │ │ │ │ │BTN1 │MS_UP│BTN2 │WH_UP│ │ │ │█████│
+ │DEBUG│ │ │ │ │ │ │BTN1 │MS_UP│BTN2 │WH_UP│ │ │ │█████│
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ │ │ │ │ │ │ │MS_LT│MS_DN│MS_RT│WH_DN│BTN3 │▒▒▒▒▒│ │█████│
├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
@@ -197,7 +197,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MOUSE] = KEYMAP(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_UP, KC_BTN2, KC_WH_U, KC_NO, KC_NO, KC_NO, \
+ DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_UP, KC_BTN2, KC_WH_U, KC_NO, KC_NO, KC_NO, \
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_WH_D, KC_BTN3, KC_NO, KC_NO, \
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
KC_TRNS, KC_NO, KC_NO, KC_POWER, KC_NO, KC_NO, KC_NO, KC_NO
@@ -646,7 +646,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
// Midi Chord Function
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+void action_function_opt(keyrecord_t *record, uint8_t id, uint8_t opt) {
uint16_t root_note = MIDI_INVALID_NOTE;
switch (opt) {
case 0: //Root note C
@@ -686,34 +686,19 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
root_note = MI_B;
break;
}
- // uint8_t root = midi_compute_note(root_note);
uint8_t major_third = root_note + 4;
uint8_t minor_third = root_note + 3;
uint8_t fifth = root_note + 7;
switch (id) {
case 0: //Major chord
- if (record->event.pressed) {
- register_code16(root_note);
- register_code16(major_third);
- register_code16(fifth);
- }
- else {
- unregister_code16(root_note);
- unregister_code16(major_third);
- unregister_code16(fifth);
- }
+ process_midi(root_note, record);
+ process_midi(major_third, record);
+ process_midi(fifth, record);
break;
case 1: //Minor chord
- if (record->event.pressed) {
- register_code16(root_note);
- register_code16(minor_third);
- register_code16(fifth);
- }
- else {
- unregister_code16(root_note);
- unregister_code16(minor_third);
- unregister_code16(fifth);
- }
+ process_midi(root_note, record);
+ process_midi(minor_third, record);
+ process_midi(fifth, record);
break;
}
}