![](/media/cache/profiles/08a35fbd01aa5aae7e04350b3dde1c4f.jpg.50x50_q85.png)
USB Keyboard
Fork of USBKeyboard_HelloWorld by
main.cpp@7:eacdf8136a16, 2015-03-01 (annotated)
- Committer:
- GOROman
- Date:
- Sun Mar 01 07:33:51 2015 +0000
- Revision:
- 7:eacdf8136a16
- Parent:
- 5:03a4211d593a
USB Keyboard
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
samux | 1:291a88a2c151 | 1 | #include "mbed.h" |
samux | 1:291a88a2c151 | 2 | #include "USBKeyboard.h" |
samux | 5:03a4211d593a | 3 | |
samux | 5:03a4211d593a | 4 | |
GOROman | 7:eacdf8136a16 | 5 | // USBキーボードのフリをする |
samux | 3:8b56768ceca2 | 6 | USBKeyboard keyboard; |
samux | 5:03a4211d593a | 7 | |
samux | 1:291a88a2c151 | 8 | int main(void) { |
samux | 1:291a88a2c151 | 9 | while (1) { |
GOROman | 7:eacdf8136a16 | 10 | // keyboard.mediaControl(KEY_VOLUME_DOWN); |
samux | 1:291a88a2c151 | 11 | keyboard.printf("Hello World from Mbed\r\n"); |
samux | 1:291a88a2c151 | 12 | keyboard.keyCode('s', KEY_CTRL); |
GOROman | 7:eacdf8136a16 | 13 | // keyboard.keyCode(KEY_CAPS_LOCK); |
GOROman | 7:eacdf8136a16 | 14 | |
GOROman | 7:eacdf8136a16 | 15 | // 5秒待つ |
GOROman | 7:eacdf8136a16 | 16 | wait(5); |
samux | 1:291a88a2c151 | 17 | } |
samux | 4:f0df6aae7147 | 18 | } |