开发者

Is there something like xinput but for output instead

开发者 https://www.devze.com 2023-02-28 22:01 出处:网络
I just found out that you can use xinput to sniff key strokes across apps running on X Is there something similar but to output data to whatever app has the focus now?

I just found out that you can use xinput to sniff key strokes across apps running on X

Is there something similar but to output data to whatever app has the focus now?

I would like to implement something like an autocomplete or smart suggestion program that listens for your keystrokes across applications and makes smart suggestion

e.g listen to whatever ha开发者_如何学JAVAppens on the browser then if you switch to terminal or your text editor you can reuse some of that data.


You can send keyboard events to an X application using XSendEvent or the XTEST extension. XTEST is significantly more powerful, but in many cases it has to be manually enabled in the X server configuration. See also this and this for more information and some sample code.


uinput

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号