Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update USBKeyboard.h#684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Epipeppy wants to merge1 commit intoarduino:main
base:main
Choose a base branch
Loading
fromEpipeppy:patch-3
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 32 additions & 12 deletionslibraries/USBHID/src/USBKeyboard.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,18 +60,6 @@ enum FUNCTION_KEY {
KEY_F10, /* F10 key */
KEY_F11, /* F11 key */
KEY_F12, /* F12 key */
KEY_F13, /* F13 key */
KEY_F14, /* F14 key */
KEY_F15, /* F15 key */
KEY_F16, /* F16 key */
KEY_F17, /* F17 key */
KEY_F18, /* F18 key */
KEY_F19, /* F19 key */
KEY_F20, /* F20 key */
KEY_F21, /* F21 key */
KEY_F22, /* F22 key */
KEY_F23, /* F23 key */
KEY_F24, /* F24 key */

KEY_PRINT_SCREEN, /* Print Screen key */
KEY_SCROLL_LOCK, /* Scroll lock */
Expand DownExpand Up@@ -188,6 +176,37 @@ class USBKeyboard: public USBHID, public ::mbed::Stream {
*/
virtual int _putc(int c);

/**
* Clear the persistent list of keys pressed.
* Currently has a limit of 10 keys.
*/
void emptyButtonBuffer();

/**
* Add a button to the persistent list of keys pressed.
* Currently has a limit of 10 keys.
*
* @param c character to be added to the list.
*/
void press_button(uint8_t c);

/**
* Send a report with all the pressed keys, then release them.
* Currently has a limit of 10 keys.
*
* @returns true if there is no error, false otherwise
*/
bool sendReleaseAll();

/**
* Send a report with the keys in the array, then release them.
* Currently has a limit of 10 keys.
*
* @param keys_array Array containing the keys you want to send.
* @returns true if there is no error, false otherwise
*/
bool sendReleaseKeys(uint8_t* keys_array);

/**
* Control media keys
*
Expand DownExpand Up@@ -231,6 +250,7 @@ class USBKeyboard: public USBHID, public ::mbed::Stream {
//dummy otherwise it doesn't compile (we must define all methods of an abstract class)
virtual int _getc();

uint8_t _keys_pressed[10];
uint8_t _configuration_descriptor[41];
uint8_t _lock_status;
PlatformMutex _mutex;
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp