summaryrefslogtreecommitdiff
path: root/keyboard/preonic/extended_keymap_common.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2015-08-25 12:30:32 -0400
committerJack Humbert <jack.humb@gmail.com>2015-08-25 12:30:32 -0400
commite6dd47db453968271dcd5e89c62c5258796511bc (patch)
treed9b0da85933a45693227837e24d05cd44e416129 /keyboard/preonic/extended_keymap_common.c
parentcda23c754e4d16438e2b42d86b4ce9a1eadc03d7 (diff)
good enough for a preview
Diffstat (limited to 'keyboard/preonic/extended_keymap_common.c')
-rw-r--r--keyboard/preonic/extended_keymap_common.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/keyboard/preonic/extended_keymap_common.c b/keyboard/preonic/extended_keymap_common.c
index ade8508444..4fa80de7cf 100644
--- a/keyboard/preonic/extended_keymap_common.c
+++ b/keyboard/preonic/extended_keymap_common.c
@@ -23,10 +23,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "action_macro.h"
#include "debug.h"
#include "backlight.h"
+#include "keymap_midi.h"
+#include <lufa.h>
static action_t keycode_to_action(uint16_t keycode);
-
/* converts key to action */
action_t action_for_key(uint8_t layer, keypos_t key)
{
@@ -69,9 +70,14 @@ action_t action_for_key(uint8_t layer, keypos_t key)
} else if (keycode == RESET) {
bootloader_jump();
return;
- } else if (keycode > RESET) {
- // MIDI
+ } else if (keycode == DEBUG) {
+ print("\nDEBUG: enabled.\n");
+ debug_enable = true;
return;
+ } else if (keycode >= 0x6000 && keycode < 0x7000) {
+ action_t action;
+ action.code = ACTION_FUNCTION_OPT(keycode & 0xFF, (keycode & 0x0F00) >> 8);
+ return action;
}
switch (keycode) {