adafruit / Adafruit_TinyUSB_Arduino

Arduino library for TinyUSB
MIT License
469 stars 122 forks source link

Release specific key in keyboard's HID report #216

Closed vishesh-varma closed 1 year ago

vishesh-varma commented 1 year ago

Currently, there are 3 functions in Adafruit_USBD_HID.h file, which are:

Since there is a function that presses one specific key, it makes sense to have a function that would only release the specified key, and not all of them. The use case here is pretty apparent, when switching between different combinations of keys, one can only press the next combination after releasing the currently pressed one.

hathach commented 1 year ago

it does not make sense to me, the press() is mostly helper only. Application should manage its own key state with keyboardReport()