From 5946f3951a9fca6e75ba4245a5c035ba62ca535c Mon Sep 17 00:00:00 2001 From: Snorky Date: Fri, 16 Feb 2024 22:48:02 +0100 Subject: [PATCH] Premiere version 0.1 --- furi_hal_usb_hid.h | 270 ++++++++++++++++++++++++++++++++++++++++ hid_usage_keyboard.h | 286 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 556 insertions(+) create mode 100644 furi_hal_usb_hid.h create mode 100644 hid_usage_keyboard.h diff --git a/furi_hal_usb_hid.h b/furi_hal_usb_hid.h new file mode 100644 index 0000000..0f6291c --- /dev/null +++ b/furi_hal_usb_hid.h @@ -0,0 +1,270 @@ +#pragma once +#include "hid_usage_desktop.h" +#include "hid_usage_button.h" +#include "hid_usage_keyboard.h" +#include "hid_usage_consumer.h" +#include "hid_usage_led.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define HID_MANUF_PRODUCT_NAME_LEN 32 + +#define HID_VID_DEFAULT 0x046D +#define HID_PID_DEFAULT 0xC529 + +/** Max number of simultaneously pressed keys (keyboard) */ +#define HID_KB_MAX_KEYS 6 +/** Max number of simultaneously pressed keys (consumer control) */ +#define HID_CONSUMER_MAX_KEYS 2 + +#define HID_KEYBOARD_NONE 0x00 + +/** HID keyboard modifier keys */ +enum HidKeyboardMods { + KEY_MOD_LEFT_CTRL = (1 << 8), + KEY_MOD_LEFT_SHIFT = (1 << 9), + KEY_MOD_LEFT_ALT = (1 << 10), + KEY_MOD_LEFT_GUI = (1 << 11), + KEY_MOD_RIGHT_CTRL = (1 << 12), + KEY_MOD_RIGHT_SHIFT = (1 << 13), + KEY_MOD_RIGHT_ALT = (1 << 14), + KEY_MOD_RIGHT_GUI = (1 << 15), +}; + +/** ASCII to keycode conversion table */ +static const uint16_t hid_asciimap[] = { + HID_KEYBOARD_NONE, // NUL + HID_KEYBOARD_NONE, // SOH + HID_KEYBOARD_NONE, // STX + HID_KEYBOARD_NONE, // ETX + HID_KEYBOARD_NONE, // EOT + HID_KEYBOARD_NONE, // ENQ + HID_KEYBOARD_NONE, // ACK + HID_KEYBOARD_NONE, // BEL + HID_KEYBOARD_DELETE, // BS Backspace + HID_KEYBOARD_TAB, // TAB Tab + HID_KEYBOARD_RETURN, // LF Enter + HID_KEYBOARD_NONE, // VT + HID_KEYBOARD_NONE, // FF + HID_KEYBOARD_NONE, // CR + HID_KEYBOARD_NONE, // SO + HID_KEYBOARD_NONE, // SI + HID_KEYBOARD_NONE, // DEL + HID_KEYBOARD_NONE, // DC1 + HID_KEYBOARD_NONE, // DC2 + HID_KEYBOARD_NONE, // DC3 + HID_KEYBOARD_NONE, // DC4 + HID_KEYBOARD_NONE, // NAK + HID_KEYBOARD_NONE, // SYN + HID_KEYBOARD_NONE, // ETB + HID_KEYBOARD_NONE, // CAN + HID_KEYBOARD_NONE, // EM + HID_KEYBOARD_NONE, // SUB + HID_KEYBOARD_NONE, // ESC + HID_KEYBOARD_NONE, // FS + HID_KEYBOARD_NONE, // GS + HID_KEYBOARD_NONE, // RS + HID_KEYBOARD_NONE, // US + HID_KEYBOARD_SPACEBAR, // ' ' Space + HID_KEYBOARD_FR_EXCLAMATION, // ! + HID_KEYBOARD_FR_DOUBLE_QUOTE, // " + HID_KEYBOARD_FR_DIESE | KEY_MOD_RIGHT_ALT, // # + HID_KEYBOARD_FR_DOLLARS, // $ + HID_KEYBOARD_FR_POURCENTAGE | KEY_MOD_LEFT_SHIFT, // % + HID_KEYBOARD_FR_ET_COMMERCIAL, // & + HID_KEYBOARD_FR_SIMPLE_QUOTE, // ' + HID_KEYBOARD_FR_PAREN_OUVRANTE, // ( + HID_KEYBOARD_FR_PAREN_FERMANTE, // ) + HID_KEYBOARD_FR_ETOILE, // * + HID_KEYBOARD_FR_PLUS | KEY_MOD_LEFT_SHIFT, // + + HID_KEYBOARD_FR_VIRGULE, // , + HID_KEYBOARD_FR_TIRET, // - + HID_KEYBOARD_FR_POINT | KEY_MOD_LEFT_SHIFT, // . + HID_KEYBOARD_FR_SLASH | KEY_MOD_LEFT_SHIFT, // / + HID_KEYBOARD_0 | KEY_MOD_LEFT_SHIFT, // 0 + HID_KEYBOARD_1 | KEY_MOD_LEFT_SHIFT, // 1 + HID_KEYBOARD_2 | KEY_MOD_LEFT_SHIFT, // 2 + HID_KEYBOARD_3 | KEY_MOD_LEFT_SHIFT, // 3 + HID_KEYBOARD_4 | KEY_MOD_LEFT_SHIFT, // 4 + HID_KEYBOARD_5 | KEY_MOD_LEFT_SHIFT, // 5 + HID_KEYBOARD_6 | KEY_MOD_LEFT_SHIFT, // 6 + HID_KEYBOARD_7 | KEY_MOD_LEFT_SHIFT, // 7 + HID_KEYBOARD_8 | KEY_MOD_LEFT_SHIFT, // 8 + HID_KEYBOARD_9 | KEY_MOD_LEFT_SHIFT, // 9 + HID_KEYBOARD_FR_DEUX_POINTS, // : + HID_KEYBOARD_FR_POINT_VIRG, // ; + HID_KEYBOARD_FR_INFERIEUR, // < + HID_KEYBOARD_FR_EGAL, // = + HID_KEYBOARD_FR_SUPERIEUR | KEY_MOD_LEFT_SHIFT, // > + HID_KEYBOARD_FR_INTERROGATION | KEY_MOD_LEFT_SHIFT, // ? + HID_KEYBOARD_FR_AROBASE | KEY_MOD_RIGHT_ALT, // @ + HID_KEYBOARD_FR_A | KEY_MOD_LEFT_SHIFT, // A + HID_KEYBOARD_B | KEY_MOD_LEFT_SHIFT, // B + HID_KEYBOARD_C | KEY_MOD_LEFT_SHIFT, // C + HID_KEYBOARD_D | KEY_MOD_LEFT_SHIFT, // D + HID_KEYBOARD_E | KEY_MOD_LEFT_SHIFT, // E + HID_KEYBOARD_F | KEY_MOD_LEFT_SHIFT, // F + HID_KEYBOARD_G | KEY_MOD_LEFT_SHIFT, // G + HID_KEYBOARD_H | KEY_MOD_LEFT_SHIFT, // H + HID_KEYBOARD_I | KEY_MOD_LEFT_SHIFT, // I + HID_KEYBOARD_J | KEY_MOD_LEFT_SHIFT, // J + HID_KEYBOARD_K | KEY_MOD_LEFT_SHIFT, // K + HID_KEYBOARD_L | KEY_MOD_LEFT_SHIFT, // L + HID_KEYBOARD_FR_M | KEY_MOD_LEFT_SHIFT, // M + HID_KEYBOARD_N | KEY_MOD_LEFT_SHIFT, // N + HID_KEYBOARD_O | KEY_MOD_LEFT_SHIFT, // O + HID_KEYBOARD_P | KEY_MOD_LEFT_SHIFT, // P + HID_KEYBOARD_FR_Q | KEY_MOD_LEFT_SHIFT, // Q + HID_KEYBOARD_R | KEY_MOD_LEFT_SHIFT, // R + HID_KEYBOARD_S | KEY_MOD_LEFT_SHIFT, // S + HID_KEYBOARD_T | KEY_MOD_LEFT_SHIFT, // T + HID_KEYBOARD_U | KEY_MOD_LEFT_SHIFT, // U + HID_KEYBOARD_V | KEY_MOD_LEFT_SHIFT, // V + HID_KEYBOARD_FR_W | KEY_MOD_LEFT_SHIFT, // W + HID_KEYBOARD_X | KEY_MOD_LEFT_SHIFT, // X + HID_KEYBOARD_Y | KEY_MOD_LEFT_SHIFT, // Y + HID_KEYBOARD_FR_Z | KEY_MOD_LEFT_SHIFT, // Z + HID_KEYBOARD_FR_BRACK_OUVRANT | KEY_MOD_RIGHT_ALT, // [ + HID_KEYBOARD_FR_BACKSLASH | KEY_MOD_RIGHT_ALT, // bslash + HID_KEYBOARD_FR_BRACK_FERMANT | KEY_MOD_RIGHT_ALT, // ] + HID_KEYBOARD_FR_CHAPEAU, // ^ + HID_KEYBOARD_FR_UNDERSCORE, // _ + HID_KEYBOARD_FR_BACK_QUOTE | KEY_MOD_RIGHT_ALT, // ` + HID_KEYBOARD_A, // a + HID_KEYBOARD_B, // b + HID_KEYBOARD_C, // c + HID_KEYBOARD_D, // d + HID_KEYBOARD_E, // e + HID_KEYBOARD_F, // f + HID_KEYBOARD_G, // g + HID_KEYBOARD_H, // h + HID_KEYBOARD_I, // i + HID_KEYBOARD_J, // j + HID_KEYBOARD_K, // k + HID_KEYBOARD_L, // l + HID_KEYBOARD_M, // m + HID_KEYBOARD_N, // n + HID_KEYBOARD_O, // o + HID_KEYBOARD_P, // p + HID_KEYBOARD_Q, // q + HID_KEYBOARD_R, // r + HID_KEYBOARD_S, // s + HID_KEYBOARD_T, // t + HID_KEYBOARD_U, // u + HID_KEYBOARD_V, // v + HID_KEYBOARD_W, // w + HID_KEYBOARD_X, // x + HID_KEYBOARD_Y, // y + HID_KEYBOARD_Z, // z + HID_KEYBOARD_FR_CRO_OUVRANT | KEY_MOD_RIGHT_ALT, // { + HID_KEYBOARD_FR_PIPE | KEY_MOD_RIGHT_ALT, // | + HID_KEYBOARD_FR_CRO_FERMANT | KEY_MOD_RIGHT_ALT, // } + HID_KEYBOARD_FR_TILD | KEY_MOD_RIGHT_ALT, // ~ + HID_KEYBOARD_NONE, // DEL +}; + +typedef struct { + // Good job knobheads, these should be uint16_t + uint32_t vid; + uint32_t pid; + char manuf[HID_MANUF_PRODUCT_NAME_LEN]; + char product[HID_MANUF_PRODUCT_NAME_LEN]; +} FuriHalUsbHidConfig; + +typedef void (*HidStateCallback)(bool state, void* context); + +/** ASCII to keycode conversion macro */ +#define HID_ASCII_TO_KEY(x) (((uint8_t)x < 128) ? (hid_asciimap[(uint8_t)x]) : HID_KEYBOARD_NONE) + +/** HID keyboard leds */ +enum HidKeyboardLeds { + HID_KB_LED_NUM = (1 << 0), + HID_KB_LED_CAPS = (1 << 1), + HID_KB_LED_SCROLL = (1 << 2), +}; + +/** HID mouse buttons */ +enum HidMouseButtons { + HID_MOUSE_BTN_LEFT = (1 << 0), + HID_MOUSE_BTN_RIGHT = (1 << 1), + HID_MOUSE_BTN_WHEEL = (1 << 2), +}; + +/** Get USB HID connection state + * + * @return true / false + */ +bool furi_hal_hid_is_connected(); + +/** Get USB HID keyboard leds state + * + * @return leds state + */ +uint8_t furi_hal_hid_get_led_state(); + +/** Set USB HID connect/disconnect callback + * + * @param cb callback + * @param ctx callback context + */ +void furi_hal_hid_set_state_callback(HidStateCallback cb, void* ctx); + +/** Set the following key to pressed state and send HID report + * + * @param button key code + */ +bool furi_hal_hid_kb_press(uint16_t button); + +/** Set the following key to released state and send HID report + * + * @param button key code + */ +bool furi_hal_hid_kb_release(uint16_t button); + +/** Clear all pressed keys and send HID report + * + */ +bool furi_hal_hid_kb_release_all(); + +/** Set mouse movement and send HID report + * + * @param dx x coordinate delta + * @param dy y coordinate delta + */ +bool furi_hal_hid_mouse_move(int8_t dx, int8_t dy); + +/** Set mouse button to pressed state and send HID report + * + * @param button key code + */ +bool furi_hal_hid_mouse_press(uint8_t button); + +/** Set mouse button to released state and send HID report + * + * @param button key code + */ +bool furi_hal_hid_mouse_release(uint8_t button); + +/** Set mouse wheel position and send HID report + * + * @param delta number of scroll steps + */ +bool furi_hal_hid_mouse_scroll(int8_t delta); + +/** Set the following consumer key to pressed state and send HID report + * + * @param button key code + */ +bool furi_hal_hid_consumer_key_press(uint16_t button); + +/** Set the following consumer key to released state and send HID report + * + * @param button key code + */ +bool furi_hal_hid_consumer_key_release(uint16_t button); + +#ifdef __cplusplus +} +#endif diff --git a/hid_usage_keyboard.h b/hid_usage_keyboard.h new file mode 100644 index 0000000..3a3d6b5 --- /dev/null +++ b/hid_usage_keyboard.h @@ -0,0 +1,286 @@ +/* This file is the part of the Lightweight USB device Stack for STM32 microcontrollers + * + * Copyright ©2016 Dmitry Filimonchuk + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _USB_HID_USAGE_KEYBOARD_H_ +#define _USB_HID_USAGE_KEYBOARD_H_ + +/**\ingroup USB_HID + * \addtogroup USB_HID_USAGES_KEYBOARD HID Usages for Keyboard + * \brief Contains USB HID Usages definitions for Keyboard/Keypad Page + * \details This module based on + * + [HID Usage Tables Version 1.12](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) + * @{ */ + +#define HID_PAGE_KEYBOARD 0x07 + +#define HID_KEYBOARD_ERR_ROLL_OVER 0x01 +#define HID_KEYBOARD_POST_FAIL 0x02 +#define HID_KEYBOARD_ERR_UNDEFINED 0x03 +#define HID_KEYBOARD_A 0x04 +#define HID_KEYBOARD_B 0x05 +#define HID_KEYBOARD_C 0x06 +#define HID_KEYBOARD_D 0x07 +#define HID_KEYBOARD_E 0x08 +#define HID_KEYBOARD_F 0x09 +#define HID_KEYBOARD_G 0x0A +#define HID_KEYBOARD_H 0x0B +#define HID_KEYBOARD_I 0x0C +#define HID_KEYBOARD_J 0x0D +#define HID_KEYBOARD_K 0x0E +#define HID_KEYBOARD_L 0x0F +#define HID_KEYBOARD_M 0x10 +#define HID_KEYBOARD_N 0x11 +#define HID_KEYBOARD_O 0x12 +#define HID_KEYBOARD_P 0x13 +#define HID_KEYBOARD_Q 0x14 +#define HID_KEYBOARD_R 0x15 +#define HID_KEYBOARD_S 0x16 +#define HID_KEYBOARD_T 0x17 +#define HID_KEYBOARD_U 0x18 +#define HID_KEYBOARD_V 0x19 +#define HID_KEYBOARD_W 0x1A +#define HID_KEYBOARD_X 0x1B +#define HID_KEYBOARD_Y 0x1C +#define HID_KEYBOARD_Z 0x1D +#define HID_KEYBOARD_1 0x1E +#define HID_KEYBOARD_2 0x1F +#define HID_KEYBOARD_3 0x20 +#define HID_KEYBOARD_4 0x21 +#define HID_KEYBOARD_5 0x22 +#define HID_KEYBOARD_6 0x23 +#define HID_KEYBOARD_7 0x24 +#define HID_KEYBOARD_8 0x25 +#define HID_KEYBOARD_9 0x26 +#define HID_KEYBOARD_0 0x27 +#define HID_KEYBOARD_RETURN 0x28 +#define HID_KEYBOARD_ESCAPE 0x29 +#define HID_KEYBOARD_DELETE 0x2A +#define HID_KEYBOARD_TAB 0x2B +#define HID_KEYBOARD_SPACEBAR 0x2C +#define HID_KEYBOARD_MINUS 0x2D +#define HID_KEYBOARD_EQUAL_SIGN 0x2E +#define HID_KEYBOARD_OPEN_BRACKET 0x2F +#define HID_KEYBOARD_CLOSE_BRACKET 0x30 +#define HID_KEYBOARD_BACKSLASH 0x31 +#define HID_KEYBOARD_NONUS_HASH 0x32 +#define HID_KEYBOARD_SEMICOLON 0x33 +#define HID_KEYBOARD_APOSTROPHE 0x34 +#define HID_KEYBOARD_GRAVE_ACCENT 0x35 +#define HID_KEYBOARD_COMMA 0x36 +#define HID_KEYBOARD_DOT 0x37 +#define HID_KEYBOARD_SLASH 0x38 +#define HID_KEYBOARD_CAPS_LOCK 0x39 +#define HID_KEYBOARD_F1 0x3A +#define HID_KEYBOARD_F2 0x3B +#define HID_KEYBOARD_F3 0x3C +#define HID_KEYBOARD_F4 0x3D +#define HID_KEYBOARD_F5 0x3E +#define HID_KEYBOARD_F6 0x3F +#define HID_KEYBOARD_F7 0x40 +#define HID_KEYBOARD_F8 0x41 +#define HID_KEYBOARD_F9 0x42 +#define HID_KEYBOARD_F10 0x43 +#define HID_KEYBOARD_F11 0x44 +#define HID_KEYBOARD_F12 0x45 +#define HID_KEYBOARD_PRINT_SCREEN 0x46 +#define HID_KEYBOARD_SCROLL_LOCK 0x47 +#define HID_KEYBOARD_PAUSE 0x48 +#define HID_KEYBOARD_INSERT 0x49 +#define HID_KEYBOARD_HOME 0x4A +#define HID_KEYBOARD_PAGE_UP 0x4B +#define HID_KEYBOARD_DELETE_FORWARD 0x4C +#define HID_KEYBOARD_END 0x4D +#define HID_KEYBOARD_PAGE_DOWN 0x4E +#define HID_KEYBOARD_RIGHT_ARROW 0x4F +#define HID_KEYBOARD_LEFT_ARROW 0x50 +#define HID_KEYBOARD_DOWN_ARROW 0x51 +#define HID_KEYBOARD_UP_ARROW 0x52 +#define HID_KEYPAD_NUMLOCK 0x53 +#define HID_KEYPAD_SLASH 0x54 +#define HID_KEYPAD_ASTERISK 0x55 +#define HID_KEYPAD_MINUS 0x56 +#define HID_KEYPAD_PLUS 0x57 +#define HID_KEYPAD_ENTER 0x58 +#define HID_KEYPAD_1 0x59 +#define HID_KEYPAD_2 0x5A +#define HID_KEYPAD_3 0x5B +#define HID_KEYPAD_4 0x5C +#define HID_KEYPAD_5 0x5D +#define HID_KEYPAD_6 0x5E +#define HID_KEYPAD_7 0x5F +#define HID_KEYPAD_8 0x60 +#define HID_KEYPAD_9 0x61 +#define HID_KEYPAD_0 0x62 +#define HID_KEYPAD_DOT 0x63 +#define HID_KEYBOARD_NONUS_BACKSLASH 0x64 +#define HID_KEYBOARD_APPLICATION 0x65 +#define HID_KEYBOARD_POWER 0x66 +#define HID_KEYPAD_EQUAL 0x67 +#define HID_KEYBOARD_F13 0x68 +#define HID_KEYBOARD_F14 0x69 +#define HID_KEYBOARD_F15 0x6A +#define HID_KEYBOARD_F16 0x6B +#define HID_KEYBOARD_F17 0x6C +#define HID_KEYBOARD_F18 0x6D +#define HID_KEYBOARD_F19 0x6E +#define HID_KEYBOARD_F20 0x6F +#define HID_KEYBOARD_F21 0x70 +#define HID_KEYBOARD_F22 0x71 +#define HID_KEYBOARD_F23 0x72 +#define HID_KEYBOARD_F24 0x73 +#define HID_KEYBOARD_EXECUTE 0x74 +#define HID_KEYBOARD_HELP 0x75 +#define HID_KEYBOARD_MENU 0x76 +#define HID_KEYBOARD_SELECT 0x77 +#define HID_KEYBOARD_STOP 0x78 +#define HID_KEYBOARD_AGAIN 0x79 +#define HID_KEYBOARD_UNDO 0x7A +#define HID_KEYBOARD_CUT 0x7B +#define HID_KEYBOARD_COPY 0x7C +#define HID_KEYBOARD_PASTE 0x7D +#define HID_KEYBOARD_FIND 0x7E +#define HID_KEYBOARD_MUTE 0x7F +#define HID_KEYBOARD_VOLUME_UP 0x80 +#define HID_KEYBOARD_VOLUME_DOWN 0x81 +#define HID_KEYBOARD_LOCK_CAPS_LOCK 0x82 +#define HID_KEYBOARD_LOCK_NUM_LOCK 0x83 +#define HID_KEYBOARD_LOCK_SCROLL_LOCK 0x84 +#define HID_KEYPAD_COMMA 0x85 +#define HID_KEYPAD_EQUAL_SIGN 0x86 +#define HID_KEYBOARD_INTERNATIONAL_1 0x87 +#define HID_KEYBOARD_INTERNATIONAL_2 0x88 +#define HID_KEYBOARD_INTERNATIONAL_3 0x89 +#define HID_KEYBOARD_INTERNATIONAL_4 0x8A +#define HID_KEYBOARD_INTERNATIONAL_5 0x8B +#define HID_KEYBOARD_INTERNATIONAL_6 0x8C +#define HID_KEYBOARD_INTERNATIONAL_7 0x8D +#define HID_KEYBOARD_INTERNATIONAL_8 0x8E +#define HID_KEYBOARD_INTERNATIONAL_9 0x8F +#define HID_KEYBOARD_LANG_1 0x90 +#define HID_KEYBOARD_LANG_2 0x91 +#define HID_KEYBOARD_LANG_3 0x92 +#define HID_KEYBOARD_LANG_4 0x93 +#define HID_KEYBOARD_LANG_5 0x94 +#define HID_KEYBOARD_LANG_6 0x95 +#define HID_KEYBOARD_LANG_7 0x96 +#define HID_KEYBOARD_LANG_8 0x97 +#define HID_KEYBOARD_LANG_9 0x98 +#define HID_KEYBOARD_ALTERNATE_ERASE 0x99 +#define HID_KEYBOARD_SYSREQ 0x9A +#define HID_KEYBOARD_CANCEL 0x9B +#define HID_KEYBOARD_CLEAR 0x9C +#define HID_KEYBOARD_PRIOR 0x9D +#define HID_KEYBOARD_RETURN_1 0x9E +#define HID_KEYBOARD_SEPARATOR 0x9F +#define HID_KEYBOARD_OUT 0xA0 +#define HID_KEYBOARD_OPER 0xA1 +#define HID_KEYBOARD_CLEAR_AGAIN 0xA2 +#define HID_KEYBOARD_CRSEL_PROPS 0xA3 +#define HID_KEYBOARD_EXSEL 0xA4 +#define HID_KEYPAD_00 0xB0 +#define HID_KEYPAD_000 0xB1 +#define HID_KEYPAD_OPEN_PARENTHESIS 0xB6 +#define HID_KEYPAD_CLOSE_PARENTHESIS 0xB7 +#define HID_KEYPAD_OPEN_BRACE 0xB8 +#define HID_KEYPAD_CLOSE_BRACE 0xB9 +#define HID_KEYPAD_TAB 0xBA +#define HID_KEYPAD_BACKSPACE 0xBB +#define HID_KEYPAD_A 0xBC +#define HID_KEYPAD_B 0xBD +#define HID_KEYPAD_C 0xBE +#define HID_KEYPAD_D 0xBF +#define HID_KEYPAD_E 0xC0 +#define HID_KEYPAD_F 0xC1 +#define HID_KEYPAD_XOR 0xC2 +#define HID_KEYPAD_CARET 0xC3 +#define HID_KEYPAD_PERCENT 0xC4 +#define HID_KEYPAD_LESS_THEN 0xC5 +#define HID_KEYPAD_GREATER_THEN 0xC6 +#define HID_KEYPAD_AMPERSAND 0xC7 +#define HID_KEYPAD_DOUBLE_AMPERSAND 0xC8 +#define HID_KEYPAD_PIPE 0xC9 +#define HID_KEYPAD_DOUBLE_PIPE 0xCA +#define HID_KEYPAD_COLON 0xCB +#define HID_KEYPAD_HASH 0xCC +#define HID_KEYPAD_SPACE 0xCD +#define HID_KEYPAD_AT 0xCE +#define HID_KEYPAD_BANG 0xCF +#define HID_KEYPAD_MEM_STORE 0xD0 +#define HID_KEYPAD_MEM_RECALL 0xD1 +#define HID_KEYPAD_MEM_CLEAR 0xD2 +#define HID_KEYPAD_MEM_ADD 0xD3 +#define HID_KEYPAD_MEM_SUBTRACT 0xD4 +#define HID_KEYPAD_MEM_MULTIPLY 0xD5 +#define HID_KEYPAD_MEM_DIVIDE 0xD6 +#define HID_KEYPAD_PLUS_MINUS 0xD7 +#define HID_KEYPAD_CLEAR 0xD8 +#define HID_KEYPAD_CLEAR_ENTRY 0xD9 +#define HID_KEYPAD_BINARY 0xDA +#define HID_KEYPAD_OCTAL 0xDB +#define HID_KEYPAD_DECIMAL 0xDC +#define HID_KEYPAD_HEXADECIMAL 0xDD +#define HID_KEYBOARD_L_CTRL 0xE0 +#define HID_KEYBOARD_L_SHIFT 0xE1 +#define HID_KEYBOARD_L_ALT 0xE2 +#define HID_KEYBOARD_L_GUI 0xE3 +#define HID_KEYBOARD_R_CTRL 0xE4 +#define HID_KEYBOARD_R_SHIFT 0xE5 +#define HID_KEYBOARD_R_ALT 0xE6 +#define HID_KEYBOARD_R_GUI 0xE7 + +#define HID_KEYBOARD_FR_EXCLAMATION 0x38 +#define HID_KEYBOARD_FR_AROBASE 0x27 +#define HID_KEYBOARD_FR_DIESE 0x20 +#define HID_KEYBOARD_FR_DOLLARS 0x30 +#define HID_KEYBOARD_FR_POURCENTAGE 0x34 +#define HID_KEYBOARD_FR_CHAPEAU 0x2f +#define HID_KEYBOARD_FR_ET_COMMERCIAL 0x1E +#define HID_KEYBOARD_FR_ETOILE 0x32 +#define HID_KEYBOARD_FR_PAREN_OUVRANTE 0x22 +#define HID_KEYBOARD_FR_PAREN_FERMANTE 0x2D +#define HID_KEYBOARD_FR_TIRET 0x23 +#define HID_KEYBOARD_FR_EGAL 0x2E +#define HID_KEYBOARD_FR_BRACK_OUVRANT 0x22 +#define HID_KEYBOARD_FR_BRACK_FERMANT 0x2D +#define HID_KEYBOARD_FR_BACKSLASH 0x25 +#define HID_KEYBOARD_FR_POINT_VIRG 0x36 +#define HID_KEYBOARD_FR_SIMPLE_QUOTE 0x21 +#define HID_KEYBOARD_FR_BACK_QUOTE 0x24 +#define HID_KEYBOARD_FR_VIRGULE 0x10 +#define HID_KEYBOARD_FR_POINT 0x36 +#define HID_KEYBOARD_FR_SLASH 0x37 +#define HID_KEYBOARD_FR_UNDERSCORE 0x25 +#define HID_KEYBOARD_FR_PLUS 0x2E +#define HID_KEYBOARD_FR_CRO_OUVRANT 0x21 +#define HID_KEYBOARD_FR_CRO_FERMANT 0x2E +#define HID_KEYBOARD_FR_PIPE 0x23 +#define HID_KEYBOARD_FR_DEUX_POINTS 0x37 +#define HID_KEYBOARD_FR_DOUBLE_QUOTE 0x20 +#define HID_KEYBOARD_FR_TILD 0x1F +#define HID_KEYBOARD_FR_INFERIEUR 0x64 +#define HID_KEYBOARD_FR_SUPERIEUR 0x64 +#define HID_KEYBOARD_FR_INTERROGATION 0x10 +#define HID_KEYBOARD_FR_A 0x14 +#define HID_KEYBOARD_FR_M 0x33 +#define HID_KEYBOARD_FR_Q 0x04 +#define HID_KEYBOARD_FR_W 0x1D +#define HID_KEYBOARD_FR_Z 0x1A + + + +/** @} */ + +#endif +