cores icon indicating copy to clipboard operation
cores copied to clipboard

teensy3/usb_keyboard: led hook, added output functions

Open kunzjacq opened this issue 6 years ago • 1 comments

  • added a function pointer to store a callback function called when a led state change is requested. callback is set with function usb_keyboard_set_led_callback.
  • added functions to send oem key presses and releases, usb_keyboard_{press, release}_key_raw, similar to existing static functions usb_keyboard_{press, release}_key. modifiers provided are applied as is by the new functions contrary to the existing ones.
  • added function usb_keyboard_set_modifiers to change modifiers without any key press/release.
  • added function usb_keyboard_send_report to send a modifier and full key state.

All new functions are in teensy3/usb_keyboard.{h,c}.

Test code with both branches keyboard_passthrough in cores/ and in USBHost_t36/:

t36_keyboard_passthrough_test.cpp.txt

kunzjacq avatar Jan 29 '18 22:01 kunzjacq