summary refs log tree commit diff
path: root/keyboard
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2015-08-20 00:42:08 -0400
committerJack Humbert <jack.humb@gmail.com>2015-08-20 00:42:08 -0400
commite528087ee539fda2f13795d4a6c03403faef44d5 (patch)
tree6f80bd86bdd5e5a044deee9bb195c0ecc9bfd670 /keyboard
parent2d76b5c3d421c984f6b4b9da757383cc87e3f808 (diff)
midi
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/planck/Makefile2
-rw-r--r--keyboard/planck/config.h2
-rw-r--r--keyboard/planck/extended_keymap_common.h1
-rw-r--r--keyboard/planck/extended_keymaps/extended_keymap_default.c13
-rw-r--r--keyboard/planck/matrix_pcb.c1
5 files changed, 15 insertions, 4 deletions
diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile
index cd67c711bc..7ea71af512 100644
--- a/keyboard/planck/Makefile
+++ b/keyboard/planck/Makefile
@@ -75,7 +75,7 @@ SRC = extended_keymap_common.c \
 	$(MATRIX) \
 	led.c \
 	backlight.c \
-	beeps.c 
+	beeps.c
 
 ifdef KEYMAP
     SRC := extended_keymaps/extended_keymap_$(KEYMAP).c $(SRC)
diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h
index 7e95afddea..4ac9f766e6 100644
--- a/keyboard/planck/config.h
+++ b/keyboard/planck/config.h
@@ -24,7 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define PRODUCT_ID      0x6060
 #define DEVICE_VER      0x0001
 #define MANUFACTURER    Ortholinear Keyboards
-#define PRODUCT         Planck
+#define PRODUCT         The Planck Keyboard
 #define DESCRIPTION     A compact ortholinear keyboard
 
 /* key matrix size */
diff --git a/keyboard/planck/extended_keymap_common.h b/keyboard/planck/extended_keymap_common.h
index 2dce4a2fac..e6a7dac5b5 100644
--- a/keyboard/planck/extended_keymap_common.h
+++ b/keyboard/planck/extended_keymap_common.h
@@ -48,6 +48,7 @@ typedef union {
 keymap_config_t keymap_config;
 #endif
 
+
 /* translates key to keycode */
 uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key);
 
diff --git a/keyboard/planck/extended_keymaps/extended_keymap_default.c b/keyboard/planck/extended_keymaps/extended_keymap_default.c
index 1d5ac4321b..710611c3cb 100644
--- a/keyboard/planck/extended_keymaps/extended_keymap_default.c
+++ b/keyboard/planck/extended_keymaps/extended_keymap_default.c
@@ -1,5 +1,6 @@
 #include "extended_keymap_common.h"
 #include "backlight.h"
+#include "lufa.h"
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 [0] = { /* Qwerty */
@@ -50,10 +51,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case 0:   
         if (record->event.pressed) {
-          register_code(KC_RSFT);
+          if (!&midi_device) {
+            register_code(KC_RSFT);
+          } else {
+            midi_send_noteon(&midi_device, 1, 64, 127);
+          }
           backlight_step();
         } else {
-          unregister_code(KC_RSFT);
+          if (!&midi_device) {
+            unregister_code(KC_RSFT);
+          } else {
+            midi_send_noteoff(&midi_device, 1, 64, 127);
+          }
         }
         break;
       } 
diff --git a/keyboard/planck/matrix_pcb.c b/keyboard/planck/matrix_pcb.c
index 6f6ccd5c1c..2a9ec8fcde 100644
--- a/keyboard/planck/matrix_pcb.c
+++ b/keyboard/planck/matrix_pcb.c
@@ -78,6 +78,7 @@ void matrix_init(void)
     }
 }
 
+
 uint8_t matrix_scan(void)
 {
     for (uint8_t i = 0; i < MATRIX_ROWS; i++) {