Skip to content

Commit be55d7f

Browse files
author
Hrvoje Cavrak
committed
Bugfixes
- Increase number of keyboards to 5, complex / weird descriptors were seen to exhaust the limit - Avoid increasing num_keyboards multiple times for a single report_id (seen with Apple keyboard)
1 parent 18f610c commit be55d7f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.6)
33
## Version Configuration.
44
## Define e.g. 0.72 as major 0 and minor 72
55
set(VERSION_MAJOR 0)
6-
set(VERSION_MINOR 73)
6+
set(VERSION_MINOR 77)
77

88
## Release Type Selection
99
option(DH_DEBUG "Build a debug version" OFF)

src/hid_report.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ void handle_keyboard_descriptor_values(report_val_t *src, report_val_t *dst, hid
114114
keyboard->nkro = *src;
115115
}
116116

117-
/* We found a keyboard on this interface. */
118-
keyboard->is_found = true;
119-
iface->num_keyboards++;
117+
/* We found a keyboard on this interface for a specific report id. */
118+
if (!keyboard->is_found) {
119+
keyboard->is_found = true;
120+
iface->num_keyboards++;
121+
}
120122
}
121123

122124
void handle_buttons(report_val_t *src, report_val_t *dst, hid_interface_t *iface) {

src/include/hid_parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define MAX_INTERFACES 12 // Per device; allows for complex devices like QMK
2525
#define MAX_KEYS 32
2626
#define MAX_REPORTS 24
27-
#define MAX_KEYBOARDS 3
27+
#define MAX_KEYBOARDS 5
2828
#define MAX_SYS_BUTTONS 8
2929
#define PRIMARY_KEYBOARD 0
3030
/*==============================================================================

0 commit comments

Comments
 (0)