10 years, 3 months ago.

How do I send an ESC character.

Using

USBMouseKeyboard key_mouse;

int main(void) { . . . {

key_mouse._putc(27); does not work, key_mouse.keyCode('[', KEY_CTRL); this does not work either }

}

Question relating to:

1 Answer

9 years, 10 months ago.

It looks like the originator of the library didn't include ESC in the USBKeyboard.cpp. Reference the CPP https://developer.mbed.org/users/mbed_official/code/USBDevice/docs/6d85e04fb59f//USBKeyboard_8cpp_source.html

Line 63 should be changed to: {0x29, 0}, /* ESC */

I found the codes here: http://www.freebsddiary.org/APC/usb_hid_usages.php