0

I am using below descriptor to send key values from keypad over HID bluetooth.

    USAGE_PAGE(1),      0x01,      
    USAGE(1),           0x06,      
    COLLECTION(1),      0x01,      
    REPORT_ID(1),        0x02,
    USAGE_PAGE(1),      0x07,      
    USAGE_MINIMUM(1), (byte) 0xE0,
    USAGE_MAXIMUM(1), (byte) 0xE7,
    LOGICAL_MINIMUM(1), 0x00,
    LOGICAL_MAXIMUM(1), 0x01,
    REPORT_SIZE(1),     0x01,      
    REPORT_COUNT(1),    0x08,
    INPUT(1),           0x02,    
    REPORT_COUNT(1),    0x01,     
    REPORT_SIZE(1),     0x08,
    INPUT(1),           0x01,       
    REPORT_COUNT(1),    0x05,      
    REPORT_SIZE(1),     0x01,
    USAGE_PAGE(1),      0x08,       
    USAGE_MINIMUM(1),   0x01,       
    USAGE_MAXIMUM(1),   0x05,      
    OUTPUT(1),          0x02,      
    REPORT_COUNT(1),    0x01,     
    REPORT_SIZE(1),     0x03,
    OUTPUT(1),          0x01,      
    REPORT_COUNT(1),    0x06,       
    REPORT_SIZE(1),     0x08,
    LOGICAL_MINIMUM(1), 0x00,
    LOGICAL_MAXIMUM(1), 0x65,       
    USAGE_PAGE(1),      0x07,       
    USAGE_MINIMUM(1),   0x00,
    USAGE_MAXIMUM(1),   0x65,
    INPUT(1),           0x00,       
    END_COLLECTION(0),

Problem that I am facing is I am able to send data but same data is being sent infinite number of time.

If I set modifier byte to 2 then everything works fine i.e uppercase latter are being sent for particular keypress but in case if i send lowercase latter data is being sent infinite number of time.

jmd_dk
  • 12,125
  • 9
  • 63
  • 94
jay shetti
  • 43
  • 6

1 Answers1

0

Keystrokes will appear to be received an "infinite number" of times when you forget to release the keys. The array contains the keys (up to 6 in your case) currently pressed. You need to clear the buffer to the "no event indicated" index, which in your case is 0x00. If you do not do this then the host will most likely implement the "typ-o-matic" key repeat function ... i.e. what you see when you press and hold a key on a normal keyboard.

aja
  • 1,525
  • 17
  • 20
  • Thank you for the answer @aja. in-spite of releasing key i was getting this error. because i was sending empty report to client with id 0x00 then i got to know i have to send keyboard id along with empty report which worked fine for me. – jay shetti Nov 06 '17 at 06:42