Keyboard.h use Backslash

I am trying to use this but the backslashes won't be typed, maybe they are being considered comments?

Keyboard.print("\\tnhfs2\SDT\Bitlocker Recovery");

I want this code to enter that as text, is there any way to fix this?

The backslash is used to create escape sequences (e.g., \n is newline). If you want to use a backslash in a string as a normal character, you need to escape the backslash. So if you want a single backslash character in the string you add \. If you want two consecutive backslashes, you add \\.

So to print this: \tnhfs2\SDT\Bitlocker Recovery, your string should look like this: "\\tnhfs2\SDT\Bitlocker Recovery".

Thank you!! I am by no means a programmer, haha

You’re welcome. I’m glad if I was able to be of assistance. Enjoy!

THANK YOU! I had the same thing and I was going bonkers.