检测键盘,在linux下鼠标活动 [英] detecting keyboard, mouse activity in linux

查看:189
本文介绍了检测键盘,在linux下鼠标活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些方法来检测鼠标/键盘活动在Linux上。类似于任何IM程序会做什么,如果没有actiivty是dected的发言权5分钟,它将把你的IM状态为我现在不在这里。 对任何帮助是AP preciated。 谢谢

I need some way to detect mouse/keyboard activity on Linux. something similar to what any IM program would do, if no actiivty is dected for say 5minutes, it will set your IM status to "I'm not here right now" Any help towards this is appreciated. Thanks

推荐答案

或者干脆用命令 xprintidle 返回空闲时间以毫秒为单位。

Or simply use the command xprintidle which returns the idle time in milliseconds.

据打包基于Debian的系统。 (来源是不提供任何更多的原始网站dtek.chalmers.se/~henoch,但你可以在<一个得到它href="http://packages.ubuntu.com/search?searchon=names&keywords=xprintidle">packages.ubuntu.com)

It has been packaged for debian based systems. (the source is not available any more on the original site dtek.chalmers.se/~henoch but you can get it at packages.ubuntu.com)

在freshmeat.net 更多信息

这篇关于检测键盘,在linux下鼠标活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆