From ae33e7aef2df36b8dc43ad9f28d4d0612fb70360 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 29 Jan 2016 16:42:17 -0800 Subject: [PATCH] astyle --- KeyboardioFirmware.ino | 12 ++++++------ key_defs.h | 6 +++--- key_events.cpp | 14 +++++++------- mouse_movement.cpp | 8 ++++---- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/KeyboardioFirmware.ino b/KeyboardioFirmware.ino index 3968f9f0..3b706ea0 100644 --- a/KeyboardioFirmware.ino +++ b/KeyboardioFirmware.ino @@ -7,13 +7,13 @@ #include "HID-Project.h" - uint8_t matrixState[ROWS][COLS] = {0}; - const Key keymaps[KEYMAPS][ROWS][COLS] = { KEYMAP_LIST }; - uint8_t primary_keymap = 0; - uint8_t temporary_keymap = 0; +uint8_t matrixState[ROWS][COLS] = {0}; +const Key keymaps[KEYMAPS][ROWS][COLS] = { KEYMAP_LIST }; +uint8_t primary_keymap = 0; +uint8_t temporary_keymap = 0; - KeyboardStorage Storage; - LEDControl LEDs; +KeyboardStorage Storage; +LEDControl LEDs; diff --git a/key_defs.h b/key_defs.h index f578f7ec..01ed70c6 100644 --- a/key_defs.h +++ b/key_defs.h @@ -32,9 +32,9 @@ typedef struct { #define MOUSE_UP B0000001 -#define MOUSE_DOWN B0000010 -#define MOUSE_LEFT B0000100 -#define MOUSE_RIGHT B0001000 +#define MOUSE_DOWN B0000010 +#define MOUSE_LEFT B0000100 +#define MOUSE_RIGHT B0001000 #define MOUSE_CENTER B0010000 #define MOUSE_WARP B0100000 #define MOUSE_WARP_END B1000000 diff --git a/key_events.cpp b/key_events.cpp index d8a1dbfe..20e978e1 100644 --- a/key_events.cpp +++ b/key_events.cpp @@ -41,15 +41,15 @@ void handle_synthetic_key_event(byte switchState, Key mappedKey) { || mappedKey.rawKey == KEY_MOUSE_BTN_R) { if (key_toggled_on (switchState)) { press_button( - (mappedKey.rawKey == KEY_MOUSE_BTN_L ? MOUSE_BUTTON_LEFT : 0x00) | - (mappedKey.rawKey == KEY_MOUSE_BTN_M ? MOUSE_BUTTON_MIDDLE : 0x00) | - (mappedKey.rawKey == KEY_MOUSE_BTN_R ? MOUSE_BUTTON_RIGHT : 0x00) ); + (mappedKey.rawKey == KEY_MOUSE_BTN_L ? MOUSE_BUTTON_LEFT : 0x00) | + (mappedKey.rawKey == KEY_MOUSE_BTN_M ? MOUSE_BUTTON_MIDDLE : 0x00) | + (mappedKey.rawKey == KEY_MOUSE_BTN_R ? MOUSE_BUTTON_RIGHT : 0x00) ); } else if (key_toggled_off(switchState)) { - release_button( - (mappedKey.rawKey == KEY_MOUSE_BTN_L ? MOUSE_BUTTON_LEFT : 0x00) | - (mappedKey.rawKey == KEY_MOUSE_BTN_M ? MOUSE_BUTTON_MIDDLE : 0x00) | - (mappedKey.rawKey == KEY_MOUSE_BTN_R ? MOUSE_BUTTON_RIGHT : 0x00) ); + release_button( + (mappedKey.rawKey == KEY_MOUSE_BTN_L ? MOUSE_BUTTON_LEFT : 0x00) | + (mappedKey.rawKey == KEY_MOUSE_BTN_M ? MOUSE_BUTTON_MIDDLE : 0x00) | + (mappedKey.rawKey == KEY_MOUSE_BTN_R ? MOUSE_BUTTON_RIGHT : 0x00) ); } } } diff --git a/mouse_movement.cpp b/mouse_movement.cpp index f1fde2b7..a4c9158a 100644 --- a/mouse_movement.cpp +++ b/mouse_movement.cpp @@ -21,13 +21,13 @@ static boolean is_warping = false; void press_button(uint8_t button) { - Mouse.press(button); - end_warping(); + Mouse.press(button); + end_warping(); -} +} void release_button(uint8_t button) { - Mouse.release(button); + Mouse.release(button); }