Skip to content

Commit

Permalink
Change to 115 keys, add NUMPAD, add PRTSC
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinWatts committed May 20, 2021
1 parent 55cccf2 commit f790d0e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
4 changes: 2 additions & 2 deletions BleKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ static const uint8_t _hidReportDescriptor[] = {
REPORT_COUNT(1), 0x06, // REPORT_COUNT (6) ; 6 bytes (Keys)
REPORT_SIZE(1), 0x08, // REPORT_SIZE(8)
LOGICAL_MINIMUM(1), 0x00, // LOGICAL_MINIMUM(0)
LOGICAL_MAXIMUM(1), 0x65, // LOGICAL_MAXIMUM(0x65) ; 101 keys
LOGICAL_MAXIMUM(1), 0x73, // LOGICAL_MAXIMUM(0x73) ; 115 keys
USAGE_PAGE(1), 0x07, // USAGE_PAGE (Kbrd/Keypad)
USAGE_MINIMUM(1), 0x00, // USAGE_MINIMUM (0)
USAGE_MAXIMUM(1), 0x65, // USAGE_MAXIMUM (0x65)
USAGE_MAXIMUM(1), 0x73, // USAGE_MAXIMUM (0x73) ; 115 keys
HIDINPUT(1), 0x00, // INPUT (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
END_COLLECTION(0), // END_COLLECTION
// ------------------------------------------------- Media Keys
Expand Down
20 changes: 19 additions & 1 deletion BleKeyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "BLECharacteristic.h"
#include "Print.h"

#define BLE_KEYBOARD_VERSION "1.1"
#define BLE_KEYBOARD_VERSION "1.2"

const uint8_t KEY_LEFT_CTRL = 0x80;
const uint8_t KEY_LEFT_SHIFT = 0x81;
Expand All @@ -19,6 +19,23 @@ const uint8_t KEY_RIGHT_SHIFT = 0x85;
const uint8_t KEY_RIGHT_ALT = 0x86;
const uint8_t KEY_RIGHT_GUI = 0x87;

const uint8_t NUM_0 = 0xEA;
const uint8_t NUM_1 = 0xE1;
const uint8_t NUM_2 = 0xE2;
const uint8_t NUM_3 = 0xE3;
const uint8_t NUM_4 = 0xE4;
const uint8_t NUM_5 = 0xE5;
const uint8_t NUM_6 = 0xE6;
const uint8_t NUM_7 = 0xE7;
const uint8_t NUM_8 = 0xE8;
const uint8_t NUM_9 = 0xE9;
const uint8_t NUM_SLASH = 0xDC;
const uint8_t NUM_ASTERIX = 0xDD;
const uint8_t NUM_MINUS = 0xDE;
const uint8_t NUM_PLUS = 0xDF;
const uint8_t NUM_ENTER = 0xE0;
const uint8_t NUM_PERIOD = 0xEB;

const uint8_t KEY_UP_ARROW = 0xDA;
const uint8_t KEY_DOWN_ARROW = 0xD9;
const uint8_t KEY_LEFT_ARROW = 0xD8;
Expand All @@ -28,6 +45,7 @@ const uint8_t KEY_TAB = 0xB3;
const uint8_t KEY_RETURN = 0xB0;
const uint8_t KEY_ESC = 0xB1;
const uint8_t KEY_INSERT = 0xD1;
const uint8_t KEY_PRTSC = 0xCE;
const uint8_t KEY_DELETE = 0xD4;
const uint8_t KEY_PAGE_UP = 0xD3;
const uint8_t KEY_PAGE_DOWN = 0xD6;
Expand Down

0 comments on commit f790d0e

Please sign in to comment.