Bring up to new Key API

pull/389/head
Jesse Vincent 8 years ago
parent d73b27eea7
commit fac7d3fe5e
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -25,9 +25,9 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_NoKey, Key_1, Key_2, Key_3, Key_4, Key_5, Key_NoKey,
Key_Backtick, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
Key_PageUp, Key_A, Key_S, Key_D, Key_F, Key_G,
Key_PageDn, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Esc,
Key_PageDown, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_Escape,
Key_LCtrl, Key_Backspace, Key_LGUI, Key_LShift,
Key_LeftControl, Key_Backspace, Key_LeftGui, Key_LeftShift,
Key_skip,
Key_skip, Key_6, Key_7, Key_8, Key_9, Key_0, Key_skip,
@ -35,7 +35,7 @@ const Key keymaps[][ROWS][COLS] PROGMEM = {
Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote,
Key_skip, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus,
Key_RShift, Key_RAlt, Key_Space, Key_RCtrl,
Key_RightShift, Key_RightAlt, Key_Spacebar, Key_RightControl,
Key_skip
),
};

@ -46,9 +46,9 @@ namespace KaleidoscopePlugins {
if (!topsyTurvyList)
return mappedKey;
if (mappedKey.raw == Key_LShift.raw)
if (mappedKey.raw == Key_LeftShift.raw)
bitWrite (topsyTurvyModState, 0, key_is_pressed (keyState));
if (mappedKey.raw == Key_RShift.raw)
if (mappedKey.raw == Key_RightShift.raw)
bitWrite (topsyTurvyModState, 1, key_is_pressed (keyState));
if (!key_is_pressed (keyState) && !key_was_pressed (keyState))
@ -69,22 +69,22 @@ namespace KaleidoscopePlugins {
if (!topsyTurvyModState) {
if (key_is_pressed (keyState))
Keyboard.press (Key_LShift.keyCode);
Keyboard.press (Key_LeftShift.keyCode);
handle_keyswitch_event (mappedKey, row, col, keyState | TOPSYTURVY);
Keyboard.sendReport ();
if (key_toggled_off (keyState))
Keyboard.release (Key_LShift.keyCode);
Keyboard.release (Key_LeftShift.keyCode);
} else {
Keyboard.release (Key_LShift.keyCode);
Keyboard.release (Key_RShift.keyCode);
Keyboard.release (Key_LeftShift.keyCode);
Keyboard.release (Key_RightShift.keyCode);
Keyboard.sendReport ();
handle_keyswitch_event (mappedKey, row, col, keyState | TOPSYTURVY);
Keyboard.sendReport ();
if (bitRead (topsyTurvyModState, 0))
Keyboard.press (Key_LShift.keyCode);
Keyboard.press (Key_LeftShift.keyCode);
if (bitRead (topsyTurvyModState, 1))
Keyboard.press (Key_RShift.keyCode);
Keyboard.press (Key_RightShift.keyCode);
}
return Key_NoKey;

Loading…
Cancel
Save