0

I couldn't find a way to do this on Mac and Linux. With Windows one could use ctypes and then use console.SendKeys. So far as I can tell there is certainly no way that Apple would let a humble user take over the mouse and keyboard, but how might an average Joe do this on Linux? Despite no findings, I would assume there is some way to do this through an X-server?

Any input, in any programming language, is very welcome

PyroAVR
  • 719
  • 1
  • 8
  • 19
  • http://unix.stackexchange.com/a/87839/14502 – John Zwinck Dec 18 '14 at 03:17
  • @JohnZwinck, I've heard of xdotool, I recall having tried this in the past. I did notice it has a C library, but it hasn't been updated recently. Thanks for the tip! – PyroAVR Dec 18 '14 at 03:51
  • On Linux you can also use uinput to inject the input events at the kernel level if you need to, but the X11 approach seems simpler. For OS X a quick search found this, which should work through ctypes: http://stackoverflow.com/questions/2379867/simulating-key-press-events-in-mac-os-x – Reilly Grant Dec 30 '14 at 23:40

1 Answers1

0

Uinput is the definitive, Kernel-guru sanctioned way to do this on Linux. Thanks to @Reily Grant for the Mac info!

PyroAVR
  • 719
  • 1
  • 8
  • 19