tk inactive

Get how long the mouse and keyboard have been inactive for, or reset the inactivity timer. This can be used to do things like preventing a screensaver from kicking in; tkchat uses it (in read mode) to set the user's status to "Away" when people are busy.

tk inactive ?-displayof window? ?reset?

Other idle time tracking facilities:

  • tkinactive rip of the Tk 8.5 builtin idle tracking code for older versions of Tk.
  • tkXwin for older versions of Tk in X Window.
  • tclWinidle for older versions of Tk in Windows (including Win9x).