Skip to content

Commit

Permalink
Merge pull request #262 from SukkoPera/more_keylayouts
Browse files Browse the repository at this point in the history
More keylayouts
  • Loading branch information
NicoHood authored Mar 12, 2021
2 parents fcd61f8 + 542b7cb commit 7e37414
Show file tree
Hide file tree
Showing 12 changed files with 3,580 additions and 943 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,28 @@
See the readme for credit to other people.
KeymapTest Example
Test a keymap to make sure that all keys type the character they are supposed
to.
Test a keylayout to make sure that all keys type the character they are
supposed to.
See HID Project documentation for more information about the keyboard API:
https://github.com/NicoHood/HID/wiki/Keyboard-API
*/

/* By default the US English layout is selected. To test a different keylayout,
* uncomment the following two lines and change the second to reflect your
* chosen layout. You can see the available layouts at the bottom of
* ImprovedKeylayouts.h in the library sources.
*/
//#define HID_CUSTOM_LAYOUT
//#define LAYOUT_ITALIAN

#include <HID-Project.h>

/* Time to wait after each key press/release so that it gets picked up by the
* host system [ms].
*/
#define KEYDELAY 5

void setup() {
Serial.begin(115200);
while (!Serial) {
Expand All @@ -36,13 +49,13 @@ void setup() {
Serial.print(c);
Serial.print(' ');
BootKeyboard.press(c);
delay (5);
delay (KEYDELAY);
BootKeyboard.release(c);
delay (5);
delay (KEYDELAY);
BootKeyboard.press(KEY_ENTER);
delay (5);
delay (KEYDELAY);
BootKeyboard.release(KEY_ENTER);
delay (5);
delay (KEYDELAY);
while (!Serial.available()) {
}
char r = Serial.read();
Expand Down
Loading

0 comments on commit 7e37414

Please sign in to comment.