Resource.cpp currently hard-codes an English qwerty keyboard mapping. For example, @ is represented as Shift-2. Thus, if a German qwertz keyboard mapping is active where Shift-2 is =, ydotool type @ results in = being typed.
Perhaps one way forward is to follow the example of dumpkeys.