Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • try for (byte i = 0; i <= 255; i++) { Keyboard.press(i) ....... .... one of the values should generate the desired character ... then use that value instead of '\\' Commented Jan 3, 2021 at 19:51
  • @jsotola: I'm a bit wary of inadvertently hitting sequences of special keys like Win followed by say F1 - so I tried an app that I suspect captures keystrokes at a low level - but that wasn't too helpful. I may try your suggestion if I can work in some safeguards so that I have time to work out what's happening before the system descends into a frenzied chaos. Commented Jan 3, 2021 at 21:24
  • figure out the byte value that represents the Win key and exclude it ... if ( i != Win ) Keyboard.press(i); Commented Jan 4, 2021 at 0:25
  • @jsotola: I was sceptical but that approach worked. I had to use a button press to increment my index because you encounter a lot of function keys etc causing help windows and other weird things to happen that you need time to recover from with a real keyboard. Keyboard.press(0xEC) produces "\" in Notepad and when used in conjunction with shift produces the expected "|". Commented Jan 5, 2021 at 21:04