瀏覽代碼

Add Keyboard.releaseAll() for Teensy3

teensy4-core
PaulStoffregen 11 年之前
父節點
當前提交
d5d7af569e
共有 2 個檔案被更改,包括 3 行新增1 行删除
  1. +2
    -0
      teensy3/usb_keyboard.c
  2. +1
    -1
      teensy3/usb_keyboard.h

+ 2
- 0
teensy3/usb_keyboard.c 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存