ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include "keymap_mac.h"
Go to the source code of this file.
Data Structures | |
struct | key |
Macros | |
#define | KEY_NONE -1 |
#define | KEY_CORSAIR -2 |
#define | KEY_UNBOUND -3 |
#define | BTN_WHEELUP 0x1f01 |
#define | BTN_WHEELDOWN 0x1f02 |
#define | KEY_BACKSLASH_ISO KEY_BACKSLASH |
#define | N_KEYS_HW 152 |
#define | N_KEYBYTES_HW ((N_KEYS_HW + 7) / 8) |
#define | N_KEY_ZONES 22 |
#define | N_KEYS_EXTRA 12 |
#define | N_BUTTONS_HW 20 |
#define | N_BUTTONS_EXTENDED 25 |
#define | MOUSE_BUTTON_FIRST (N_KEYS_HW + N_KEY_ZONES + N_KEYS_EXTRA) |
#define | MOUSE_EXTRA_FIRST (MOUSE_BUTTON_FIRST + N_BUTTONS_HW) |
#define | N_KEYS_INPUT (MOUSE_BUTTON_FIRST + N_BUTTONS_EXTENDED) |
#define | N_KEYBYTES_INPUT ((N_KEYS_INPUT + 7) / 8) |
#define | LED_MOUSE N_KEYS_HW |
#define | N_MOUSE_ZONES 6 |
#define | N_MOUSE_ZONES_EXTENDED 12 |
#define | LED_DPI (LED_MOUSE + 2) |
#define | N_KEYS_EXTENDED (N_KEYS_INPUT + N_MOUSE_ZONES_EXTENDED) |
#define | N_KEYBYTES_EXTENDED ((N_KEYS_EXTENDED + 7) / 8) |
#define | SCAN_SILENT 0x8000 |
#define | SCAN_KBD 0 |
#define | SCAN_MOUSE 0x1000 |
Functions | |
void | hid_kb_translate (unsigned char *kbinput, int endpoint, int length, const unsigned char *urbinput) |
void | hid_mouse_translate (unsigned char *kbinput, short *xaxis, short *yaxis, int endpoint, int length, const unsigned char *urbinput, ushort fwversion) |
void | corsair_kbcopy (unsigned char *kbinput, int endpoint, const unsigned char *urbinput) |
void | corsair_mousecopy (unsigned char *kbinput, int endpoint, const unsigned char *urbinput) |
Variables | |
const key | keymap [(((152+22+12)+25)+12)] |
struct key |
#define BTN_WHEELDOWN 0x1f02 |
Definition at line 13 of file keymap.h.
Referenced by os_keypress().
#define BTN_WHEELUP 0x1f01 |
Definition at line 12 of file keymap.h.
Referenced by os_keypress().
#define KEY_UNBOUND -3 |
Definition at line 9 of file keymap.h.
Referenced by cmd_unbind().
#define LED_DPI (LED_MOUSE + 2) |
Definition at line 43 of file keymap.h.
Referenced by loadrgb_mouse(), and savergb_mouse().
#define LED_MOUSE N_KEYS_HW |
Definition at line 39 of file keymap.h.
Referenced by isblack(), loaddpi(), loadrgb_mouse(), rgbcmp(), savedpi(), savergb_mouse(), and updatergb_mouse().
#define MOUSE_BUTTON_FIRST (N_KEYS_HW + N_KEY_ZONES + N_KEYS_EXTRA) |
Definition at line 33 of file keymap.h.
Referenced by corsair_mousecopy(), and hid_mouse_translate().
#define MOUSE_EXTRA_FIRST (MOUSE_BUTTON_FIRST + N_BUTTONS_HW) |
Definition at line 34 of file keymap.h.
Referenced by hid_mouse_translate().
#define N_BUTTONS_HW 20 |
Definition at line 31 of file keymap.h.
Referenced by corsair_mousecopy().
#define N_KEYBYTES_EXTENDED ((N_KEYS_EXTENDED + 7) / 8) |
#define N_KEYBYTES_HW ((N_KEYS_HW + 7) / 8) |
Definition at line 25 of file keymap.h.
Referenced by corsair_kbcopy().
#define N_KEYBYTES_INPUT ((N_KEYS_INPUT + 7) / 8) |
Definition at line 37 of file keymap.h.
Referenced by _cmd_macro(), inputupdate_keys(), and macromask().
#define N_KEYS_EXTENDED (N_KEYS_INPUT + N_MOUSE_ZONES_EXTENDED) |
Definition at line 45 of file keymap.h.
Referenced by printrgb(), and readcmd().
#define N_KEYS_HW 152 |
Definition at line 24 of file keymap.h.
Referenced by loadrgb_kb(), makergb_512(), rgbcmp(), and setactive_kb().
#define N_KEYS_INPUT (MOUSE_BUTTON_FIRST + N_BUTTONS_EXTENDED) |
Definition at line 36 of file keymap.h.
Referenced by _cmd_get(), _cmd_macro(), cmd_bind(), cmd_notify(), cmd_rebind(), cmd_unbind(), initbind(), and inputupdate_keys().
#define N_MOUSE_ZONES 6 |
#define SCAN_MOUSE 0x1000 |
Definition at line 58 of file keymap.h.
Referenced by os_keypress().
#define SCAN_SILENT 0x8000 |
Definition at line 56 of file keymap.h.
Referenced by inputupdate_keys().
void corsair_kbcopy | ( | unsigned char * | kbinput, |
int | endpoint, | ||
const unsigned char * | urbinput | ||
) |
Definition at line 420 of file keymap.c.
References N_KEYBYTES_HW.
Referenced by os_inputmain().
void corsair_mousecopy | ( | unsigned char * | kbinput, |
int | endpoint, | ||
const unsigned char * | urbinput | ||
) |
Definition at line 429 of file keymap.c.
References BUTTON_HID_COUNT, CLEAR_KEYBIT, MOUSE_BUTTON_FIRST, N_BUTTONS_HW, and SET_KEYBIT.
Referenced by os_inputmain().
void hid_kb_translate | ( | unsigned char * | kbinput, |
int | endpoint, | ||
int | length, | ||
const unsigned char * | urbinput | ||
) |
Definition at line 246 of file keymap.c.
References ckb_warn, CLEAR_KEYBIT, and SET_KEYBIT.
Referenced by os_inputmain().
void hid_mouse_translate | ( | unsigned char * | kbinput, |
short * | xaxis, | ||
short * | yaxis, | ||
int | endpoint, | ||
int | length, | ||
const unsigned char * | urbinput, | ||
ushort | fwversion | ||
) |
Definition at line 391 of file keymap.c.
References BUTTON_HID_COUNT, CLEAR_KEYBIT, MOUSE_BUTTON_FIRST, MOUSE_EXTRA_FIRST, and SET_KEYBIT.
Referenced by os_inputmain().
const key keymap[(((152+22+12)+25)+12)] |
Definition at line 5 of file keymap.c.
Referenced by _cmd_get(), _cmd_macro(), cmd_bind(), cmd_rebind(), cmd_rgb(), initbind(), inputupdate_keys(), nprintkey(), printrgb(), readcmd(), and setactive_kb().