If you have problems with your PC locking or going to sleep, caffeine will keep it awake. It works by simulating
a keypress once every 59 seconds, so your machine thinks you're still working at the keyboard, so won't lock
the screen or activate the screensaver.
The icon is shown above - it's the leftmost one in the task tray, and this is all you see. Double-clicking the
icon empties the coffee pot (that's what the icon is) and temporarily disables the program. Double-clicking it
again refills the pot, and will keep your machine awake.
By default the app starts enabled, and works every 59 seconds. There are some command line switches you can use to
alter this behaviour:
- xx - where xx is a number which sets the number of seconds between simulated keypresses. This
must be the first text on the commandline
- -startoff - application starts disabled.
- -exitafter:xx - application will terminate after xx minutes
- -activefor:xx - application will become inactive after xx minutes
- -inactivefor:xx - application will become active after xx minutes
- -appexit - terminates current running instance of application
- -appon - makes the current running instance of the application active
- -appoff - makes the current running instance of the application inactive
- -apptoggle - toggles the running state of the current running instance of the application
- -apptoggleshowdlg - toggles the running state, and shows dialog
- -replace - closes the current running instance, replacing it
- -noicon - does not show a task tray icon
- -useshift - simulate the shift key instead of F15
- -showdlg - shows a dialog indicating whether caffeine is active
- -ontaskbar - show a task bar button (use with -showdlg)
- -allowss - prevent sleep, but allow the screensaver to start
- -key:xx - simulate using virtual key code xx
Note: the codes on the linked page are in Hex, convert them to decimal for use with this parameter
- -keypress - simulate a full key press, not just a key up event
- -oldicons - use more colourful tray icons
Caffeine works by simulating an F15 key up event every 59 seconds. Of all the key presses available, F15 is probably the least
intrusive, and least likely to interfere with your work.
However, Caffeine might interfere with some apps:
If you think any of these might cause you a problem, set the -useshift command line parameter.
- PowerPoint uses the F15 keypress to pause video in a slide
- Google Docs/Sheets
- Terminal emulation, e.g. Putty
Caffeine user humancar2n has put together a
short YouTube video showing how the app works.
Do you need this functionality on your Mac? Lighthead Software have written a separate app,
also named Caffeine, which can help you out.
v1.64 - 25th September 17
Option for old icons added, 'cos not everyone likes the new ones
v1.63 - 19th February 17
Icons updated slightly to show up better on a white background.
v1.62 - 8th April 16
New icons, designed by Rubén Gómez Radioboy
v1.61 - 10th October 15
Fixed bug with app not going active/inactive correctly when a timed period elapsed
v1.6 - 8th July 13
New command line options:
Added menu items to go Active/Inactive
Type in About box corrected
-apptoggle will re-show the dialog if it was originally shown
v1.5 - 2nd November 10
New command line options:
Simulated keypress changed from right context menu key to F15 as this is likely to be even less intrusive.
v1.4 - 18th July 09
New command line options:
Hovering over the tray icon now shows the status of the app
v1.35 - 28th May 09
Simulated keypress changed from shift to the right context menu key (at the suggestion of Kevin Kleinfelter)
as this is likely to be less intrusive.
v1.3 - 3rd February 09
Command line switches added to terminate the app after x minutes, disable the app after x
minutes, and enable or disable the currently running instance of the app
v1.2 - 15th March 08
Command line switches added to set the interval and to start disabled
Annoyingly, some Antivirus products detect the above file as having a virus in it - something called Razy or Spursint.A.
It's connected with the new icons added in April 2016. The icon file which I added is clean, but if
I build the app with those cool new icons in, it then scans as infected. Building the app with the old icons does not -
there is no other difference.
So here's the same download, just without the new icons, if this causes you trouble
If you need something a little more ... targeted, then try Targeted Caffeine. It will send a fake shift
or F15 keypress to a specific window, rather than simulate it happening no matter which window has input
You're able to set up one or more windows, by their class and window title, which get sent a key press
at the intervals you choose.
At the same time, Targeted Caffeine will also send those more general simulated key presses so that
Windows remains awake.
You might find the app useful if you use an application which needs a little "prod" every now and then to
convince it that you're still using it, so that it doesn't log you out.
- 1st December 2017 - bug fix: custom time periods are now saved and loaded correctly
- 16th July 2018 - new feature: added F5 keypress