midi
This commit is contained in:
@@ -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)
|
||||
|
@@ -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 */
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -78,6 +78,7 @@ void matrix_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
|
Reference in New Issue
Block a user