Fri Jul 24, 2015 10:37 pm
Keyboards do not send symbols to the computer, they report the pressing and releasing of keys using arbitrary codes based largely on the physical positions.
uinput gives the physical keys names like KEY_Q according to the main character they would type in a US layout. If your Raspbian is set for a Russian layout then KEY_Q may actually type Й.
To get shifted symbols like № you have to simulate pressing KEY_3 while simulating holding KEY_LEFTSHIFT or KEY_RIGHTSHIFT. For some symbols you may need to hold KEY_RIGHTALT.
Again, uinput is very low level and leaves the handling of layouts up to you. It also makes it very difficult to direct the simulated events to a particular program. If it is an X11 client you are trying to control, XSendEvent from xlib may be a better option. I have no experience using that from Python, though.