The 9000 limit is infuriating sometimes >:( #just lost the whole post
I have a routine that emulates a keyboard. All works fine, but the line feed and enter functions were removed/not used in the demo code I lifted off Google many moons ago (can't find it now).
When I press Enter on my attached keyboard, it reports 10 followed by 13. That is line feed, followed by enter.
The command for trigger enter I believe is:
Keyboard.press(KEY_ENTER); Keyboard.release(KEY_ENTER);
But I cannot find the one for line feed (if there is one).
Any ideas?
This is a code snippet... I lost the post when I tried posting the whole routine.
When you press Enter on the keyboard, it does jump to case 235 (Line feed) and case 238 (Enter).
case 231: // Control F
Keyboard.set_modifier(MODIFIERKEY_CTRL);
Keyboard.send_now();
Keyboard.set_key1(KEY_F);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
break;
case 232: // Control G
Keyboard.set_modifier(MODIFIERKEY_CTRL);
Keyboard.send_now();
Keyboard.set_key1(KEY_G);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
break;
case 233: // Backspace
Keyboard.press(KEY_BACKSPACE); Keyboard.release(KEY_BACKSPACE);
break;
case 234: // Tab
Keyboard.press(KEY_TAB); Keyboard.release(KEY_TAB);
break;
case 235: // Line feed Originally disabled
//Keyboard.press(?); Keyboard.release(?);
break;
case 236: // Control K
Keyboard.set_modifier(MODIFIERKEY_CTRL);
Keyboard.send_now();
Keyboard.set_key1(KEY_K);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
break;
case 237: // Control L
Keyboard.set_modifier(MODIFIERKEY_CTRL);
Keyboard.send_now();
Keyboard.set_key1(KEY_L);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
break;
case 238: // Carriage return Originally disabled
Keyboard.press(KEY_ENTER); Keyboard.release(KEY_ENTER);
break;
case 239: // Control N
Keyboard.set_modifier(MODIFIERKEY_CTRL);
Keyboard.send_now();
Keyboard.set_key1(KEY_N);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
break;
case 240: // Control O
Keyboard.set_modifier(MODIFIERKEY_CTRL);
Keyboard.send_now();
Keyboard.set_key1(KEY_O);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
break;