Small fixups to get the kickstarter version of the Model 01 working with the new HID core

pull/18/head
Jesse Vincent 9 years ago
parent 638a17464b
commit 8304401bb0

@ -208,7 +208,7 @@ boolean is_command_buffer(byte* myCommand) {
if (commandBuffer[i] != myCommand[i]) { if (commandBuffer[i] != myCommand[i]) {
return false; return false;
} }
} while (myCommand[++i] != NULL); } while (myCommand[++i] != 0x00);
return true; return true;
} }
@ -223,7 +223,7 @@ void process_command_buffer() {
// This is the only command we might want to execute when // This is the only command we might want to execute when
// we're not in command mode, as it's the only way to toggle // we're not in command mode, as it's the only way to toggle
// command mode on // command mode on
static byte cmd_plugh[] = {KEY_P, KEY_L, KEY_U, KEY_G, KEY_H, NULL}; static byte cmd_plugh[] = {KEY_P, KEY_L, KEY_U, KEY_G, KEY_H, 0x00};
if (is_command_buffer(cmd_plugh)) { if (is_command_buffer(cmd_plugh)) {
command_plugh(); command_plugh();
} }
@ -235,8 +235,8 @@ void process_command_buffer() {
} }
// Handle all the other commands here // Handle all the other commands here
static byte cmd_reboot_bootloader[] = { KEY_B, KEY_O, KEY_O, KEY_T, KEY_L, KEY_O, KEY_A, KEY_D, KEY_E, KEY_R, NULL}; static byte cmd_reboot_bootloader[] = { KEY_B, KEY_O, KEY_O, KEY_T, KEY_L, KEY_O, KEY_A, KEY_D, KEY_E, KEY_R, 0x00};
static byte cmd_version[] = { KEY_V, KEY_E, KEY_R, KEY_S, KEY_I, KEY_O, KEY_N, NULL}; static byte cmd_version[] = { KEY_V, KEY_E, KEY_R, KEY_S, KEY_I, KEY_O, KEY_N, 0x00};
if (is_command_buffer(cmd_reboot_bootloader)) { if (is_command_buffer(cmd_reboot_bootloader)) {
command_reboot_bootloader(); command_reboot_bootloader();

@ -137,7 +137,7 @@ typedef struct {
#define Key_DnArrow (Key){ KEY_FLAGS, HID_KEYBOARD_DOWN_ARROW } #define Key_DnArrow (Key){ KEY_FLAGS, HID_KEYBOARD_DOWN_ARROW }
#define Key_LArrow (Key){ KEY_FLAGS, HID_KEYBOARD_LEFT_ARROW } #define Key_LArrow (Key){ KEY_FLAGS, HID_KEYBOARD_LEFT_ARROW }
#define Key_RArrow (Key){ KEY_FLAGS, HID_KEYBOARD_RIGHT_ARROW} #define Key_RArrow (Key){ KEY_FLAGS, HID_KEYBOARD_RIGHT_ARROW}
#define Key_Return (Key){ KEY_FLAGS, KEY_RETURN } #define Key_Return (Key){ KEY_FLAGS, HID_KEYBOARD_RETURN }
#define Key_Esc (Key){ KEY_FLAGS, KEY_ESC } #define Key_Esc (Key){ KEY_FLAGS, KEY_ESC }
#define Key_Backspace (Key){ KEY_FLAGS, KEY_BACKSPACE } #define Key_Backspace (Key){ KEY_FLAGS, KEY_BACKSPACE }
#define Key_Tab (Key){ KEY_FLAGS, KEY_TAB } #define Key_Tab (Key){ KEY_FLAGS, KEY_TAB }

@ -1,5 +1,3 @@
#pragma once
#define KEYMAP_COLEMAK { /* Generated keymap for COLEMAK */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ #define KEYMAP_COLEMAK { /* Generated keymap for COLEMAK */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\
{Key_Backtick, Key_Q, Key_W, Key_F, Key_P, Key_G, Key_skip, Key_skip, Key_J, Key_L, Key_U, Key_Y, Key_Semicolon, Key_Equals},\ {Key_Backtick, Key_Q, Key_W, Key_F, Key_P, Key_G, Key_skip, Key_skip, Key_J, Key_L, Key_U, Key_Y, Key_Semicolon, Key_Equals},\
{Key_PageUp, Key_A, Key_R, Key_S, Key_T, Key_D, Key_Tab, Key_Return, Key_H, Key_N, Key_E, Key_I, Key_O, Key_Quote},\ {Key_PageUp, Key_A, Key_R, Key_S, Key_T, Key_D, Key_Tab, Key_Return, Key_H, Key_N, Key_E, Key_I, Key_O, Key_Quote},\
@ -17,6 +15,11 @@
{Key_Home, Key_mouseL, Key_mouseDn, Key_mouseR, Key_mouseWarpSW, Key_mouseWarpSE, Key_nextTrack, Key_LGUI, Key_RAlt, Key_Delete, Key_LArrow, Key_DnArrow, Key_UpArrow, Key_RArrow, Key_F11, Key_F12},\ {Key_Home, Key_mouseL, Key_mouseDn, Key_mouseR, Key_mouseWarpSW, Key_mouseWarpSE, Key_nextTrack, Key_LGUI, Key_RAlt, Key_Delete, Key_LArrow, Key_DnArrow, Key_UpArrow, Key_RArrow, Key_F11, Key_F12},\
{Key_End, Key_Z, Key_X, Key_C, Key_V, Key_mouseWarpEnd, Key_skip, Key_LShift, Key_RShift, Key_skip, Key_volumeDown, Key_volumeUp, Key_BacklightDn, Key_BacklightUp, Key_Backslash, Key_Pipe},\ {Key_End, Key_Z, Key_X, Key_C, Key_V, Key_mouseWarpEnd, Key_skip, Key_LShift, Key_RShift, Key_skip, Key_volumeDown, Key_volumeUp, Key_BacklightDn, Key_BacklightUp, Key_Backslash, Key_Pipe},\
}, },
#define KEYMAP_GENERIC_FN2_MOO { /* Generated keymap for GENERIC_FN2_MOO */ {Key_skip, Key_F1, Key_F2, Key_F3, Key_F4, Key_F5, Key_NoKey, Key_LCtrl, Key_RCtrl, Key_NoKey, Key_F6, Key_F7, Key_F8, Key_F9, Key_Keymap0, Key_skip},\
{Key_Tab, Key_mouseBtnM, Key_mouseUp, Key_skip, Key_mouseWarpNW, Key_mouseWarpNE, Key_NoKey, Key_mouseBtnL, Key_mouseBtnR, Key_NoKey, Key_playPause, Key_LCurlyBracket, Key_RCurlyBracket, Key_LEFT_PAREN, Key_RIGHT_PAREN, Key_sleep},\
{Key_Home, Key_mouseL, Key_mouseDn, Key_mouseR, Key_mouseWarpSW, Key_mouseWarpSE, Key_nextTrack, Key_LShift, Key_RShift, Key_Delete, Key_LArrow, Key_DnArrow, Key_UpArrow, Key_RArrow, Key_F11, Key_F12},\
{Key_End, Key_Z, Key_X, Key_C, Key_V, Key_mouseWarpEnd, Key_skip, Key_LGUI, Key_RAlt, Key_skip, Key_volumeDown, Key_volumeUp, Key_LSquareBracket, Key_RSquareBracket, Key_Backslash, Key_Pipe},\
},
#define KEYMAP_MALTRON { /* Generated keymap for MALTRON */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\ #define KEYMAP_MALTRON { /* Generated keymap for MALTRON */ {Key_skip, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip},\
{Key_Backtick, Key_Q, Key_P, Key_Y, Key_C, Key_B, Key_skip, Key_skip, Key_V, Key_M, Key_U, Key_Z, Key_L, Key_Equals},\ {Key_Backtick, Key_Q, Key_P, Key_Y, Key_C, Key_B, Key_skip, Key_skip, Key_V, Key_M, Key_U, Key_Z, Key_L, Key_Equals},\
{Key_PageUp, Key_A, Key_N, Key_I, Key_S, Key_F, Key_Tab, Key_Return, Key_D, Key_T, Key_H, Key_O, Key_R, Key_Quote},\ {Key_PageUp, Key_A, Key_N, Key_I, Key_S, Key_F, Key_Tab, Key_Return, Key_D, Key_T, Key_H, Key_O, Key_R, Key_Quote},\
@ -30,9 +33,14 @@
}, },
#define KEYMAP_QWERTY { /* Generated keymap for QWERTY */ {Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_LCtrl, Key_RCtrl, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_Keymap2},\ #define KEYMAP_QWERTY { /* Generated keymap for QWERTY */ {Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_LCtrl, Key_RCtrl, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_Keymap2},\
{Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_KeymapNext_Momentary, Key_Backspace, Key_Space, Key_KeymapNext_Momentary, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\ {Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_KeymapNext_Momentary, Key_Backspace, Key_Space, Key_KeymapNext_Momentary, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\
{Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, Key_Tab, Key_LGUI, Key_RAlt, Key_Return, Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote},\ {Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, Key_Tab, Key_LGUI, Key_RAlt, Key_Enter, Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote},\
{Key_PageDn, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Esc, Key_LShift, Key_RShift, Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus},\ {Key_PageDn, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Esc, Key_LShift, Key_RShift, Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus},\
}, },
#define KEYMAP_QWERTY_MOO { /* Generated keymap for QWERTY_MOO */ {Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_LCtrl, Key_RCtrl, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_Keymap2},\
{Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_KeymapNext_Momentary, Key_Backspace, Key_Space, Key_KeymapNext_Momentary, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\
{Key_Backslash, Key_A, Key_S, Key_D, Key_F, Key_G, Key_Tab, Key_LShift, Key_RShift, Key_Return, Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote},\
{Key_PageDn, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Esc, Key_LGUI, Key_RAlt, Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus},\
},
#define KEYMAP_QWERTY_ALT_CMD { /* Generated keymap for QWERTY_ALT_CMD */ {Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_LCtrl, Key_RCtrl, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_Keymap2},\ #define KEYMAP_QWERTY_ALT_CMD { /* Generated keymap for QWERTY_ALT_CMD */ {Key_LEDEffectNext, Key_1, Key_2, Key_3, Key_4, Key_5, Key_skip, Key_LCtrl, Key_RCtrl, Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_Keymap2},\
{Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_KeymapNext_Momentary, Key_Backspace, Key_Space, Key_KeymapNext_Momentary, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\ {Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_KeymapNext_Momentary, Key_Backspace, Key_Space, Key_KeymapNext_Momentary, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals},\
{Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, Key_Tab, Key_LAlt, Key_RGUI, Key_Return, Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote},\ {Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G, Key_Tab, Key_LAlt, Key_RGUI, Key_Return, Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote},\

@ -1,5 +1,5 @@
#NAME: QWERTY #NAME: QWERTY
LEDEffectNext 1 2 3 4 5 skip LCtrl RCtrl skip 6 7 8 9 0 Keymap2 LEDEffectNext 1 2 3 4 5 skip LCtrl RCtrl skip 6 7 8 9 0 Keymap2
` Q W E R T KeymapNext_Momentary Backspace Space KeymapNext_Momentary Y U I O P = ` Q W E R T KeymapNext_Momentary Backspace Space KeymapNext_Momentary Y U I O P =
PageUp A S D F G Tab LGUI RAlt Return H J K L ; ' PageUp A S D F G Tab LGUI RAlt Enter H J K L ; '
PageDn Z X C V B Esc LShift RShift skip N M , . / - PageDn Z X C V B Esc LShift RShift skip N M , . / -

Loading…
Cancel
Save