when I connect it to iPad and test it, the basic keyboard function works well, but the Caps Lock function does not work.

Hi, Guys.

I am developing a custom hardware keyboard using the ble_app_hids_keyboard example source code of SDK17.1.0.
The basic keyboard function works well.
And Caps Lock also works well on iPad.

After that, I implemented three additional functions, keyboard + mouse + consumer control, as in the link below.

https://devzone.nordicsemi.com/f/nordic-q-a/86442/ble-integrated-hid-keyboard-and-mouse-not-working-on-android-works-on-ios-pc

However, when I connect it to iPad and test it, the basic keyboard function works well, but the Caps Lock function does not work.
That is, I disabled the iPad's Settings - General - Keyboard - Hardware Keyboard - [Switch Languages using Caps Lock].
Then, the Caps Lock function should work, but the custom board I am developing does not work, so only lowercase letters are entered.
It is the same source as the link above, but I do not know how to make Caps Lock work on iPad. Please help me.

In other words, when I add the mouse and consumer control, Caps Lock does not work on iPad. How can I fix this problem?

My source code is:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define INPUT_REPORT_COUNT 4
/* Keyboard - Input */
#define INPUT_REPORT_KEYS_MAX_LEN 8 /**< Maximum length of the Input Report characteristic. */
#define INPUT_REPORT_KEYS_INDEX 0 /**< Index of Input Report. */
#define INPUT_REPORT_REF_KEYS_ID 1 /**< Id of reference to Keyboard Input Report. */
/* Keyboard - Output */
#define OUTPUT_REPORT_MAX_LEN 1 /**< Maximum length of Output Report. */
#define OUTPUT_REPORT_INDEX 0 /**< Index of Output Report. */
#define OUTPUT_REPORT_REF_ID 1 /**< Id of reference to Keyboard Output Report. */
/* Keyboard - Feature */
#define FEATURE_REPORT_MAX_LEN 2 /**< Maximum length of Feature Report. */
#define FEATURE_REPORT_INDEX 0 /**< Index of Feature Report. */
#define FEATURE_REPORT_REF_ID 1 /**< ID of reference to Keyboard Feature Report. */
/* Mouse - Buttons */
#define INPUT_REPORT_BUTTONS_LEN 3 /**< Length of Mouse Input Report containing button data. */
#define INPUT_REPORT_BUTTONS_INDEX 1 /**< Index of Mouse Input Report containing button data. */
#define INPUT_REPORT_REF_BUTTONS_ID 2 /**< Id of reference to Mouse Input Report containing button data. */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static void hids_init(void)
{
ret_code_t err_code;
ble_hids_init_t hids_init_obj;
ble_hids_inp_rep_init_t * p_input_report;
ble_hids_outp_rep_init_t * p_output_report;
ble_hids_feature_rep_init_t * p_feature_report;
uint8_t hid_info_flags;
static ble_hids_inp_rep_init_t input_report_array[INPUT_REPORT_COUNT];
static ble_hids_outp_rep_init_t output_report_array[1];
static ble_hids_feature_rep_init_t feature_report_array[1];
static uint8_t report_map_data[] =
{
//////// Keyboard ///////////////////////////////////////////////////////////
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection (Application)
0x85, 0x01, // Report Id (1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Best Regards,