Mac needs character to keycode translation table
Running this example code:
from pykeyboard import PyKeyboard k = PyKeyboard() k.type_string('Hello, World!')
Gives:
python test.py
Traceback (most recent call last):
File "test.py", line 3, in
Characters are not yet implemented on Mac. So You'll have to insert keycodes for now.
Me or @SavinaRoja should write this support sometime, but patch welcome.
Ahh cool. Apologies for hassling :)
NP.
Changed the title to reflect the actual problem.
This might be useful: https://gist.github.com/willwade/5330474 I was looking to develop something similar till I stumbled across pyuserinput
Very nice. Where did you get that from?
There is some discussion about this in #1.
From http://web.archive.org/web/20100501161453/http://www.classicteck.com/rbarticles/mackeyboard.php I'll try and get my head around how PyUserInput works and see if I have anything decent to add to the discussion in #1
Thanks!
(the little csv method for doing keycodes is working pretty well in my quick 5 minute play.. you can see the implementation in convertWintoMacCode at https://github.com/willwade/MacroServerMac/blob/master/AppleUIEvents.py - one thing I've noticed though is that some of those keycodes are wrong. I'm wondering if they have a different codes on different layouts)
Initial support for keycode translation on OS X added in 70419b3654950ca0188b3115964f762363d7ef93
It needs some more work and polishing.