Digistump Forums
The Digispark => Digispark (Original) Support => Topic started by: theRAGEhero on October 16, 2019, 12:48:11 am
-
Hi guys, am I blind or there isn't the TAB key?
I need to move as we can usually do it with TAB on Windows. The DigiKeyboard.print('\t'); command doesn't work.
I hope someone can help me and that the question is not so idiot.
Thank you in advance.
-
For sending keyboard characters, you do not want to use "C"-style codes, but rather the direct keyboard scan code. There is a table at: https://www.shsu.edu/csc_tjm/fall2000/cs272/scan_codes.html, but I have noticed a lot of differences in the different keycode tables. It took checking several different tables before I found a good one for my project (sorry, I don't remember where I found the "right" one.) Also, if you are not using the U.S. keyboard layout, make sure that you find a table which matches your keyboard layout.
Anyway, the table I referenced shows that the scan code for the tab key is 0FH, which is 15 base 10. So, you would want to use something like:
DigiKeyboard.sendKeyStroke(10);Try that, and see if it does what you want. If not, try searching for other keyboard scan code tables, and see if one of them will work.
-
thank you, I'll try!