Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
GenericKeyboard Class Reference
Generic keyboard. More...
#include <GenericKeyboard.h>
Inherited by USBAbsMouseKeyboard, USBKeyboard, and USBMouseKeyboard.
Public Member Functions | |
| GenericKeyboard () | |
| Constructor for a Generic keyboard. | |
| bool | keyCode (uint8_t modifier, uint8_t key) |
| Send all kinds of characters (ctrl + key, ...). | |
| virtual int | _putc (int c) |
| Send a character. | |
| bool | mediaControl (MEDIA_KEY key) |
| Control media keys. | |
Detailed Description
Generic keyboard.
This class is just an API to use in a child class. See USBKeyboard.h for instance for more information.
Definition at line 55 of file GenericKeyboard.h.
Constructor & Destructor Documentation
| GenericKeyboard | ( | ) |
Constructor for a Generic keyboard.
Definition at line 61 of file GenericKeyboard.h.
Member Function Documentation
| int _putc | ( | int | c ) | [virtual] |
Send a character.
- Parameters:
-
c character to be sent
- Returns:
- true if there is no error, false otherwise
Definition at line 10 of file GenericKeyboard.c.
| bool keyCode | ( | uint8_t | modifier, |
| uint8_t | key | ||
| ) |
Send all kinds of characters (ctrl + key, ...).
//To send CTRL + s (save) keyboard.keyCode(CTRL, 's');
- Parameters:
-
modifier bit 0: CTRL, bit 1: SHIFT, bit 2: ALT key character to send
- Returns:
- true if there is no error, false otherwise
Definition at line 14 of file GenericKeyboard.c.
| bool mediaControl | ( | MEDIA_KEY | key ) |
Control media keys.
- Parameters:
-
key media key pressed (KEY_NEXT_TRACK, KEY_PREVIOUS_TRACK, KEY_STOP, KEY_PLAY_PAUSE, KEY_MUTE, KEY_VOLUME_UP, KEY_VOLUME_DOWN)
- Returns:
- true if there is no error, false otherwise
Definition at line 47 of file GenericKeyboard.c.
Generated on Fri Jul 22 2022 22:32:37 by
1.7.2