Author Topic: TAB key to move around windows  (Read 3727 times)

theRAGEhero

  • Newbie
  • *
  • Posts: 2
TAB key to move around windows
« 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.

granzeier

  • Jr. Member
  • **
  • Posts: 73
Re: TAB key to move around windows
« Reply #1 on: October 16, 2019, 03:17:35 am »
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:
Code: [Select]
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.

theRAGEhero

  • Newbie
  • *
  • Posts: 2
Re: TAB key to move around windows
« Reply #2 on: October 17, 2019, 09:03:22 am »
thank you, I'll try!