'How do I get xdotool to type a backslash on a German keyboard?

I am using xdotool to automate tasks on Linux and I need to type a backslash, however doing this:

xdotool key U005C

I get a "ß".

This happens to be the other letter on the same key on my German keyboard, so I suspect this is a keyboard mapping issue.

Also, for context: this is a Windows application under Wine, but I get the same result in the terminal.

How do I get xdotool to type a backslash then?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source