Replace deprecated syntax for bitfield

pull/1090/head
Jesse Vincent 3 years ago
parent 6a3e2d4eee
commit 4c84e8c093
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -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)

@ -19,9 +19,9 @@
#include <Arduino.h>
#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

@ -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)

Loading…
Cancel
Save