Browse Source

Add Keyboard.releaseAll() for Teensy3

main
PaulStoffregen 11 years ago
parent
commit
d5d7af569e
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      teensy3/usb_keyboard.c
  2. +1
    -1
      teensy3/usb_keyboard.h

+ 2
- 0
teensy3/usb_keyboard.c View File

@@ -395,6 +395,8 @@ void usb_keyboard_release_all(void)

anybits = keyboard_modifier_keys;
keyboard_modifier_keys = 0;
anybits |= keyboard_media_keys;
keyboard_media_keys = 0;
for (i=0; i < 6; i++) {
anybits |= keyboard_keys[i];
keyboard_keys[i] = 0;

+ 1
- 1
teensy3/usb_keyboard.h View File

@@ -87,7 +87,7 @@ public:
void send_now(void) { usb_keyboard_send(); }
void press(uint16_t n) { usb_keyboard_press_keycode(n); }
void release(uint16_t n) { usb_keyboard_release_keycode(n); }
void releaseAll(void);
void releaseAll(void) { usb_keyboard_release_all(); }
};

extern usb_keyboard_class Keyboard;

Loading…
Cancel
Save