- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using a CYBLE-416045 and I'm sending keystrokes from a custom keyboard to devices.
I am using the SendKeystroke() that I copied from the hids.c in the CY8CPROTO-063 demo board.
The keys keep sticking, not because the switch is stuck but because the BLE HID Report requires you to send a cancel keyboard_data = {0,0,0,0,0,0,0,0}. That Send runs into a CyBle_GattGetBusyStatus() == 0x1, so the cancel Report doesn't get sent and the Repeat Delay on the keyboard setting somewhere times out as if the key is stuck in the down position.
Is there a way to set the keyboard repeat-delay setting to off, or to disable down-key repeat? My keyboard will never need the hold-down repeat function.
In the mean time I'm desperately sending multiple cancel requests, but that can't be the right solution.
if(protocol == CY_BLE_HIDS_PROTOCOL_MODE_BOOT) { apiResult = Cy_BLE_HIDSS_SendNotification(connHandle, CY_BLE_HUMAN_INTERFACE_DEVICE_SERVICE_INDEX, CY_BLE_HIDS_BOOT_KYBRD_IN_REP, KEYBOARD_DATA_SIZE, keyboard_data); } else { apiResult = Cy_BLE_HIDSS_SendNotification(connHandle, CY_BLE_HUMAN_INTERFACE_DEVICE_SERVICE_INDEX, CY_BLE_HUMAN_INTERFACE_DEVICE_REPORT_IN, KEYBOARD_DATA_SIZE, keyboard_data); } cancelRepeatResult = Cy_BLE_HIDSS_SendNotification(connHandle, CY_BLE_HUMAN_INTERFACE_DEVICE_SERVICE_INDEX, CY_BLE_HUMAN_INTERFACE_DEVICE_REPORT_IN, KEYBOARD_DATA_SIZE, cancel_repeat_data); int retries = 0; while(cancelRepeatResult > 0 && retries < BLE_RETRY_COUNT){ retries +=1; cancelRepeatResult = Cy_BLE_HIDSS_SendNotification(connHandle, CY_BLE_HUMAN_INTERFACE_DEVICE_SERVICE_INDEX, CY_BLE_HUMAN_INTERFACE_DEVICE_REPORT_IN, KEYBOARD_DATA_SIZE, cancel_repeat_data); DBG_PRINTF_LINE("cancelRepeatResult == 0x%X", cancelRepeatResult); Cy_SysLib_Delay(BLE_RETRY_DELAY_TICKS); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you please share your project which you modified, I will check at my end.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thread was locked due to inactivity for long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.
Thanks and Regards,
P Yugandhar