So I recently delved in to the world of DigiSpark Attiny85 boards with a view to making a low-cost (disposible) Rubby Ducky for cyber security and pen testing work.
Unfortunately, while these little boards are “ok”, the DigiKeyboard.h library is built to map US keyboard scan codes to ASCII characters. For UK keyboards this is OK for the most part but some special characters are an absolute bastard to work out.
NOTE: I’d say the DigiSpark boards are great but they have clear hit-and-miss issues with USB 3.0 controllers that I suspect is going to render them useful over the next few years as these USB 3.0 becomes the standard.
Hut1_12v2 USB HID Usage Tables
On page 53 is a table which contains the scan codes Usage ID (DEC) column for each of the keys on a US keyboard.
How to type tricky characters on a DigiSpark in the UK
Using the @ symbol as an example:
Locate the @ symbol on your own keybboard
Find the corresponding key on a US keyboard (this image may help)
In our example, the @ symbol is actually a quotation mark ” on the US keyboard
Using the Hut1_12v2.pdf (useful links and documents above) find the character in the table and grab the Usage ID, in this example it’s number 52
Send the usage ID using thesendKeyStroke command, adding MOD_SHIFT_LEFT if its required for that character on the US keyboard, for example:
When I get more time I’ll pull together
The pipe symbol | was particularly difficult to sort but can be typed using:
The @ symbol can be typed using: