@@ -60,18 +60,6 @@ enum FUNCTION_KEY {
60
60
KEY_F10, /* F10 key */
61
61
KEY_F11, /* F11 key */
62
62
KEY_F12, /* F12 key */
63
- KEY_F13, /* F13 key */
64
- KEY_F14, /* F14 key */
65
- KEY_F15, /* F15 key */
66
- KEY_F16, /* F16 key */
67
- KEY_F17, /* F17 key */
68
- KEY_F18, /* F18 key */
69
- KEY_F19, /* F19 key */
70
- KEY_F20, /* F20 key */
71
- KEY_F21, /* F21 key */
72
- KEY_F22, /* F22 key */
73
- KEY_F23, /* F23 key */
74
- KEY_F24, /* F24 key */
75
63
76
64
KEY_PRINT_SCREEN, /* Print Screen key */
77
65
KEY_SCROLL_LOCK, /* Scroll lock */
@@ -188,6 +176,37 @@ class USBKeyboard: public USBHID, public ::mbed::Stream {
188
176
*/
189
177
virtual int _putc (int c);
190
178
179
+ /* *
180
+ * Clear the persistent list of keys pressed.
181
+ * Currently has a limit of 10 keys.
182
+ */
183
+ void emptyButtonBuffer ();
184
+
185
+ /* *
186
+ * Add a button to the persistent list of keys pressed.
187
+ * Currently has a limit of 10 keys.
188
+ *
189
+ * @param c character to be added to the list.
190
+ */
191
+ void press_button (uint8_t c);
192
+
193
+ /* *
194
+ * Send a report with all the pressed keys, then release them.
195
+ * Currently has a limit of 10 keys.
196
+ *
197
+ * @returns true if there is no error, false otherwise
198
+ */
199
+ bool sendReleaseAll ();
200
+
201
+ /* *
202
+ * Send a report with the keys in the array, then release them.
203
+ * Currently has a limit of 10 keys.
204
+ *
205
+ * @param keys_array Array containing the keys you want to send.
206
+ * @returns true if there is no error, false otherwise
207
+ */
208
+ bool sendReleaseKeys (uint8_t * keys_array);
209
+
191
210
/* *
192
211
* Control media keys
193
212
*
@@ -231,6 +250,7 @@ class USBKeyboard: public USBHID, public ::mbed::Stream {
231
250
// dummy otherwise it doesn't compile (we must define all methods of an abstract class)
232
251
virtual int _getc ();
233
252
253
+ uint8_t _keys_pressed[10 ];
234
254
uint8_t _configuration_descriptor[41 ];
235
255
uint8_t _lock_status;
236
256
PlatformMutex _mutex;
0 commit comments