I'm trying to use the Digispark as a Rubber Ducky but the Digispark is only usable with the US laylout. German keyboard layout is QWERTZ. Some keys can be changed, like y and z, but if there are [ or ] this isn't possible. Trying to define a [-key in DigiKeyboard.h displays a ΓΌ.

Does someone know a solution?


You can edit the file scancode-ascii-table.h in your DigiKeyboard library. It basically states which ASCII code corresponds to which keyboard scancode.

So if you try to print the ':' character but get a '>' instead, you know that in the above mentioned file at the ASCII position for ':' is the scancode for a '>'.

Using this, you can swap the scancodes around and basically create your own 'mapping'. For example, if you swap the values at ASCII 89, 90 and 121, 122 you for example solve the Y/Z switch.

However, I have not figured out how to correctly print a backslash. You might have to map that do a different ASCII character you don't need.

To add to this answer, there exists a workaround using mame82's duck2spark: https://github.com/mame82/duck2spark


Solution is here: Python script to convert RubberDucky payloads to DigiSpark sketch with respect to choosen keyboard layout:


Btw: The keys '<' '|' and '>' are on NON-US-KEY-100 on German keyboard layout. The key has value 0x64 for USB HID and the right modifiers have to be set (f.e. ALT_GR for '|' ). You could send them using


For details see USB HID usage tables


here is a library version of Digistump with german keyboard support https://github.com/adnanonline/DigistumpArduinoDe I adapted the keyboard library: digistump-avr/libraries/DigisparkKeyboard/DigiKeyboard.h to the german layout

Not the answer you're looking for? Browse other questions tagged or ask your own question.