Control the mouse and keyboard Golang?

前端 未结 3 760
长发绾君心
长发绾君心 2021-02-14 02:40

How would one go about controlling retrieving/setting the position of the mouse and triggier keyboard events on the operating system/X11 level? This is similar to functionality

相关标签:
3条回答
  • 2021-02-14 03:08

    ncurses bind - is the most lightweight solution I've found, all the others are parts of graphic or gaming engines

    0 讨论(0)
  • 2021-02-14 03:19

    Please see robotgo, Golang Native cross-platform system automation

    0 讨论(0)
  • 2021-02-14 03:25

    There are lots of ways to tackle this.

    The project that appears closest to what you describe is "ui"

    The next level up would be to use one of the go bindings that calls SDL, which might be easier.

    Higher up the stack would be a toolkit like GTK, QT, FLTK, (or even X11 as BurntSushi5 mentioned, but I wouldn't recommend it.) Just search github for the toolkit and select by language.

    0 讨论(0)
提交回复
热议问题