From 4c84e8c093e4e4ab9bb7a9d7a2d170144769407b Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 24 Sep 2021 14:03:15 -0700 Subject: [PATCH] Replace deprecated syntax for bitfield --- .../plugin/MouseKeys/MouseKeyDefs.h | 18 +++++++++--------- src/kaleidoscope/keyswitch_state.h | 6 +++--- src/kaleidoscope/plugin/LEDControl.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys/MouseKeyDefs.h b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys/MouseKeyDefs.h index c811e136..f35aa4ba 100644 --- a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys/MouseKeyDefs.h +++ b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/MouseKeys/MouseKeyDefs.h @@ -16,7 +16,7 @@ #pragma once -#define IS_MOUSE_KEY B00010000 +#define IS_MOUSE_KEY 0b00010000 // Synthetic, not internal #define KEY_MOUSE_BTN_L MOUSE_LEFT // Synthetic key @@ -25,15 +25,15 @@ #define KEY_MOUSE_BTN_P MOUSE_PREV #define KEY_MOUSE_BTN_N MOUSE_NEXT -#define KEY_MOUSE_UP B0000001 -#define KEY_MOUSE_DOWN B0000010 -#define KEY_MOUSE_LEFT B0000100 -#define KEY_MOUSE_RIGHT B0001000 -#define KEY_MOUSE_WHEEL B0010000 -#define KEY_MOUSE_WARP B0100000 -#define KEY_MOUSE_WARP_END B1000000 +#define KEY_MOUSE_UP 0b0000001 +#define KEY_MOUSE_DOWN 0b0000010 +#define KEY_MOUSE_LEFT 0b0000100 +#define KEY_MOUSE_RIGHT 0b0001000 +#define KEY_MOUSE_WHEEL 0b0010000 +#define KEY_MOUSE_WARP 0b0100000 +#define KEY_MOUSE_WARP_END 0b1000000 // all buttons end warp. also, we're out of bits -#define KEY_MOUSE_BUTTON B1000000 +#define KEY_MOUSE_BUTTON 0b1000000 #define Key_mouseWarpNW Key(KEY_MOUSE_WARP| KEY_MOUSE_UP | KEY_MOUSE_LEFT, KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY) diff --git a/src/kaleidoscope/keyswitch_state.h b/src/kaleidoscope/keyswitch_state.h index c4d119ab..6210a868 100644 --- a/src/kaleidoscope/keyswitch_state.h +++ b/src/kaleidoscope/keyswitch_state.h @@ -19,9 +19,9 @@ #include -#define INJECTED B10000000 -#define IS_PRESSED B00000010 -#define WAS_PRESSED B00000001 +#define INJECTED 0b10000000 +#define IS_PRESSED 0b00000010 +#define WAS_PRESSED 0b00000001 /* keyIsPressed(): This is true if the key is pressed during this scan cycle. * This will be true for several consecutive cycles even for a single tap of diff --git a/src/kaleidoscope/plugin/LEDControl.h b/src/kaleidoscope/plugin/LEDControl.h index 388f0f96..99ba7a0c 100644 --- a/src/kaleidoscope/plugin/LEDControl.h +++ b/src/kaleidoscope/plugin/LEDControl.h @@ -27,7 +27,7 @@ #endif -#define LED_TOGGLE B00000001 // Synthetic, internal +#define LED_TOGGLE 0b00000001 // Synthetic, internal #define Key_LEDEffectNext Key(0, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE) #define Key_LEDEffectPrevious Key(1, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE)