rename SYNTHETIC_KEY to SYNTHETIC

pull/30/head
Jesse Vincent 8 years ago
parent d882c14158
commit a907c70f3d

@ -21,7 +21,7 @@ typedef union {
#define GUI_HELD B00010000 #define GUI_HELD B00010000
#define SWITCH_TO_KEYMAP B00100000 #define SWITCH_TO_KEYMAP B00100000
#define MOMENTARY B01000000 #define MOMENTARY B01000000
#define SYNTHETIC_KEY B10000000 #define SYNTHETIC B10000000
// we assert that synthetic keys can never have keys held, so we reuse the _HELD bits // we assert that synthetic keys can never have keys held, so we reuse the _HELD bits
#define IS_MACRO B00000001 #define IS_MACRO B00000001
@ -71,63 +71,63 @@ typedef union {
#define Key_NoKey (Key){ KEY_FLAGS,0 } #define Key_NoKey (Key){ KEY_FLAGS,0 }
#define Key_skip (Key){ KEY_FLAGS,0 } #define Key_skip (Key){ KEY_FLAGS,0 }
#define Key_macroKey1 (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MACRO, 1} #define Key_macroKey1 (Key){ KEY_FLAGS|SYNTHETIC|IS_MACRO, 1}
#define Key_mouseWarpNW (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_UP | KEY_MOUSE_LEFT } #define Key_mouseWarpNW (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_UP | KEY_MOUSE_LEFT }
#define Key_mouseWarpNE (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_UP | KEY_MOUSE_RIGHT } #define Key_mouseWarpNE (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_UP | KEY_MOUSE_RIGHT }
#define Key_mouseWarpSW (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_DOWN | KEY_MOUSE_LEFT } #define Key_mouseWarpSW (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_DOWN | KEY_MOUSE_LEFT }
#define Key_mouseWarpSE (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_DOWN | KEY_MOUSE_RIGHT } #define Key_mouseWarpSE (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_DOWN | KEY_MOUSE_RIGHT }
#define Key_mouseWarpEnd (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_WARP_END} #define Key_mouseWarpEnd (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_WARP| KEY_MOUSE_WARP_END}
#define Key_mouseUpL (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_UP | KEY_MOUSE_LEFT } #define Key_mouseUpL (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_UP | KEY_MOUSE_LEFT }
#define Key_mouseUp (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_UP } #define Key_mouseUp (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_UP }
#define Key_mouseUpR (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_UP | KEY_MOUSE_RIGHT } #define Key_mouseUpR (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_UP | KEY_MOUSE_RIGHT }
#define Key_mouseL (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_LEFT } #define Key_mouseL (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_LEFT }
#define Key_mouseR (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_RIGHT } #define Key_mouseR (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_RIGHT }
#define Key_mouseDnL (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_DOWN | KEY_MOUSE_LEFT } #define Key_mouseDnL (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_DOWN | KEY_MOUSE_LEFT }
#define Key_mouseDn (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_DOWN } #define Key_mouseDn (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_DOWN }
#define Key_mouseDnR (Key){ KEY_FLAGS|SYNTHETIC_KEY|IS_MOUSE_KEY, KEY_MOUSE_DOWN | KEY_MOUSE_RIGHT } #define Key_mouseDnR (Key){ KEY_FLAGS|SYNTHETIC|IS_MOUSE_KEY, KEY_MOUSE_DOWN | KEY_MOUSE_RIGHT }
#define Key_mouseScrollUp #define Key_mouseScrollUp
#define Key_mouseScrollDn #define Key_mouseScrollDn
#define Key_mouseScrollL #define Key_mouseScrollL
#define Key_mouseScrollR #define Key_mouseScrollR
#define Key_mouseBtnL (Key){ KEY_FLAGS | SYNTHETIC_KEY, KEY_MOUSE_BTN_L } #define Key_mouseBtnL (Key){ KEY_FLAGS | SYNTHETIC, KEY_MOUSE_BTN_L }
#define Key_mouseBtnM (Key){ KEY_FLAGS | SYNTHETIC_KEY , KEY_MOUSE_BTN_M } #define Key_mouseBtnM (Key){ KEY_FLAGS | SYNTHETIC , KEY_MOUSE_BTN_M }
#define Key_mouseBtnR (Key){ KEY_FLAGS | SYNTHETIC_KEY, KEY_MOUSE_BTN_R } #define Key_mouseBtnR (Key){ KEY_FLAGS | SYNTHETIC, KEY_MOUSE_BTN_R }
#define Key_powerDown (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_POWER_DOWN } #define Key_powerDown (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_POWER_DOWN }
#define Key_sleep (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_SLEEP } #define Key_sleep (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_SLEEP }
#define Key_wakeup (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_WAKEUP } #define Key_wakeup (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_WAKEUP }
#define Key_coldRestart (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_COLD_RESTART } #define Key_coldRestart (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_COLD_RESTART }
#define Key_warmRestart (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_WARM_RESTART } #define Key_warmRestart (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_WARM_RESTART }
#define Key_dock (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DOCK } #define Key_dock (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DOCK }
#define Key_undock (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_UNDOCK } #define Key_undock (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_UNDOCK }
#define Key_speakerMute (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_SPEAKER_MUTE } #define Key_speakerMute (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_SPEAKER_MUTE }
#define Key_hibernate (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_HIBERNATE } #define Key_hibernate (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_HIBERNATE }
#define Key_displayInvert (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DISPLAY_INVERT } #define Key_displayInvert (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DISPLAY_INVERT }
#define Key_displayInternal (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DISPLAY_INTERNAL } #define Key_displayInternal (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DISPLAY_INTERNAL }
#define Key_displayExternal (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DISPLAY_EXTERNAL } #define Key_displayExternal (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DISPLAY_EXTERNAL }
#define Key_displayBoth (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DISPLAY_BOTH } #define Key_displayBoth (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DISPLAY_BOTH }
#define Key_displayDual (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DISPLAY_DUAL } #define Key_displayDual (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DISPLAY_DUAL }
#define Key_displayToggle (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DISPLAY_TOGGLE_INT_EXT #define Key_displayToggle (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DISPLAY_TOGGLE_INT_EXT
#define Key_displaySwap (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_SYSCTL,HID_SYSTEM_DISPLAY_SWAP } #define Key_displaySwap (Key) {KEY_FLAGS | SYNTHETIC|IS_SYSCTL,HID_SYSTEM_DISPLAY_SWAP }
#define Key_volumeMute (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_MUTE} #define Key_volumeMute (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_MUTE}
#define Key_volumeUp (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_VOLUME_INCREMENT } #define Key_volumeUp (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_VOLUME_INCREMENT }
#define Key_volumeDown (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_VOLUME_DECREMENT } #define Key_volumeDown (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_VOLUME_DECREMENT }
#define Key_playPause (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_PLAY_SLASH_PAUSE} #define Key_playPause (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_PLAY_SLASH_PAUSE}
#define Key_stop (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_STOP} #define Key_stop (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_STOP}
#define Key_prevTrack (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_SCAN_PREVIOUS_TRACK} #define Key_prevTrack (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_SCAN_PREVIOUS_TRACK}
#define Key_nextTrack (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_SCAN_NEXT_TRACK} #define Key_nextTrack (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_SCAN_NEXT_TRACK}
#define Key_Eject (Key) {KEY_FLAGS | SYNTHETIC_KEY|IS_CONSUMER, HID_CONSUMER_EJECT} #define Key_Eject (Key) {KEY_FLAGS | SYNTHETIC|IS_CONSUMER, HID_CONSUMER_EJECT}
#define Key_LCtrl (Key){ KEY_FLAGS, HID_KEYBOARD_LEFT_CONTROL } #define Key_LCtrl (Key){ KEY_FLAGS, HID_KEYBOARD_LEFT_CONTROL }
@ -297,6 +297,6 @@ typedef union {
#define Key_LEDEffectNext (Key) { KEY_FLAGS | SYNTHETIC_KEY | IS_INTERNAL, LED_TOGGLE } #define Key_LEDEffectNext (Key) { KEY_FLAGS | SYNTHETIC | IS_INTERNAL, LED_TOGGLE }

@ -71,7 +71,7 @@ bool handle_key_event_default(byte row, byte col, uint8_t currentState, uint8_t
if (baseKey.flags & SWITCH_TO_KEYMAP) { if (baseKey.flags & SWITCH_TO_KEYMAP) {
handle_keymap_key_event(baseKey, currentState, previousState); handle_keymap_key_event(baseKey, currentState, previousState);
} else if (mappedKey.flags & SYNTHETIC_KEY) { } else if (mappedKey.flags & SYNTHETIC) {
handle_synthetic_key_event( mappedKey, currentState, previousState); handle_synthetic_key_event( mappedKey, currentState, previousState);
} else if (key_is_pressed(currentState, previousState)) { } else if (key_is_pressed(currentState, previousState)) {
press_key(mappedKey); press_key(mappedKey);

Loading…
Cancel
Save