mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Update and fmt event
This commit is contained in:
parent
18c74d6c02
commit
cfc16a18d1
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
@ -9,8 +9,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "../iohook.h"
|
#include "../iohook.h"
|
||||||
|
|
||||||
#include "input.h"
|
|
||||||
// #include "../logger_c.h"
|
// #include "../logger_c.h"
|
||||||
|
#include "input.h"
|
||||||
|
|
||||||
// TODO Possibly relocate to input helper.
|
// TODO Possibly relocate to input helper.
|
||||||
static inline CGEventFlags get_key_event_mask(iohook_event * const event) {
|
static inline CGEventFlags get_key_event_mask(iohook_event * const event) {
|
||||||
|
@ -4,20 +4,20 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE_WEAK_IMPORT
|
#ifndef USE_WEAK_IMPORT
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
#include <mach/mach_time.h>
|
#include <mach/mach_time.h>
|
||||||
#ifdef USE_OBJC
|
#ifdef USE_OBJC
|
||||||
#include <objc/objc.h>
|
#include <objc/objc.h>
|
||||||
#include <objc/objc-runtime.h>
|
#include <objc/objc-runtime.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include "../iohook.h"
|
#include "../iohook.h"
|
||||||
|
|
||||||
#include "input.h"
|
|
||||||
// #include "../logger_c.h"
|
// #include "../logger_c.h"
|
||||||
|
#include "input.h"
|
||||||
|
|
||||||
typedef struct _hook_info {
|
typedef struct _hook_info {
|
||||||
CFMachPortRef port;
|
CFMachPortRef port;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#include <Carbon/Carbon.h> // For HIToolbox kVK_ keycodes and TIS funcitons.
|
#include <Carbon/Carbon.h> // For HIToolbox kVK_ keycodes and TIS funcitons.
|
||||||
#ifdef USE_IOKIT
|
#ifdef USE_IOKIT
|
||||||
#include <IOKit/hidsystem/ev_keymap.h>
|
#include <IOKit/hidsystem/ev_keymap.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
@ -27,7 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// #define NX_KEYTYPE_CAPS_LOCK 0x04
|
// #define NX_KEYTYPE_CAPS_LOCK 0x04
|
||||||
//#define NX_KEYTYPE_HELP 0x05
|
// #define NX_KEYTYPE_HELP 0x05
|
||||||
// #define NX_POWER_KEY 0x06
|
// #define NX_POWER_KEY 0x06
|
||||||
|
|
||||||
// #define NX_KEYTYPE_EJECT 0x0E
|
// #define NX_KEYTYPE_EJECT 0x0E
|
||||||
|
@ -4,16 +4,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_COREFOUNDATION
|
#ifdef USE_COREFOUNDATION
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef USE_WEAK_IMPORT
|
#ifndef USE_WEAK_IMPORT
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "../iohook.h"
|
|
||||||
|
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "../iohook.h"
|
||||||
#include "../logger_c.h"
|
#include "../logger_c.h"
|
||||||
|
|
||||||
// Current dead key state.
|
// Current dead key state.
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#define __IOHOOK_H
|
#define __IOHOOK_H
|
||||||
|
|
||||||
// #include "../../base/os.h"
|
// #include "../../base/os.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#ifndef _included_logger
|
#ifndef _included_logger
|
||||||
#define _included_logger
|
#define _included_logger
|
||||||
|
|
||||||
// #include <iohook.h>
|
|
||||||
#include "iohook.h"
|
#include "iohook.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
// #include <iohook.h>
|
|
||||||
#include "iohook.h"
|
|
||||||
|
|
||||||
|
#include "iohook.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
|
||||||
static bool default_logger(unsigned int level, const char *format, ...) {
|
static bool default_logger(unsigned int level, const char *format, ...) {
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
#include "../iohook.h"
|
#include "../iohook.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "input.h"
|
|
||||||
// #include "logger.h"
|
// #include "logger.h"
|
||||||
|
#include "input.h"
|
||||||
|
|
||||||
// Some buggy versions of MinGW and MSys do not include these constants in winuser.h.
|
// Some buggy versions of MinGW and MSys do not include these constants in winuser.h.
|
||||||
#ifndef MAPVK_VK_TO_VSC
|
#ifndef MAPVK_VK_TO_VSC
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "../iohook.h"
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include "../iohook.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
// #include "logger.h"
|
// #include "logger.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
Input
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _included_input_helper
|
#ifndef _included_input_helper
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -8,9 +8,9 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../iohook.h"
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include "../iohook.h"
|
||||||
#include "../logger_c.h"
|
#include "../logger_c.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
@ -593,7 +593,7 @@ static int refresh_locale_list() {
|
|||||||
|
|
||||||
SIZE_T keycode_to_unicode(DWORD keycode, PWCHAR buffer, SIZE_T size) {
|
SIZE_T keycode_to_unicode(DWORD keycode, PWCHAR buffer, SIZE_T size) {
|
||||||
// Get the thread id that currently has focus and ask for its current
|
// Get the thread id that currently has focus and ask for its current
|
||||||
// locale..
|
// locale.
|
||||||
DWORD focus_pid = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
|
DWORD focus_pid = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
|
||||||
HKL locale_id = GetKeyboardLayout(focus_pid);
|
HKL locale_id = GetKeyboardLayout(focus_pid);
|
||||||
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../iohook.h"
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include "../iohook.h"
|
||||||
// #include "logger.h"
|
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
// #include "logger.h"
|
||||||
|
|
||||||
// The handle to the DLL module pulled in DllMain on DLL_PROCESS_ATTACH.
|
// The handle to the DLL module pulled in DllMain on DLL_PROCESS_ATTACH.
|
||||||
HINSTANCE hInst;
|
HINSTANCE hInst;
|
||||||
@ -89,8 +88,7 @@ IOHOOK_API screen_data* hook_create_screen_info(unsigned char *count) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// Populate the count.
|
// Populate the count.
|
||||||
*count = screens.count;
|
*count = screens.count;
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#ifdef USE_XKBCOMMON
|
#ifdef USE_XKBCOMMON
|
||||||
#include <X11/Xlib-xcb.h>
|
#include <X11/Xlib-xcb.h>
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#include <xkbcommon/xkbcommon-x11.h>
|
#include <xkbcommon/xkbcommon-x11.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user