Technical Guide

How a Browser Mouse Jiggler Works

Why computers go idle, how Teams detects Away status, and exactly what each of KeepAwake's 5 techniques does to prevent it.

Understanding why Teams keeps showing Away — and how a browser tool fixes it — requires understanding three things: how OS idle detection works, how Teams uses it, and what browsers can do to interfere with it.

Part 1: Why Computers Go Idle

Every modern operating system maintains an idle timer — a counter that measures elapsed time since your last qualifying hardware input. On Windows, this is tracked internally and exposed via the GetLastInputInfo() API call. On macOS, it's the IOHIDGetParameter system call. On both platforms, the timer resets only when genuine hardware events are detected: a physical mouse movement, a keyboard press, or a touchscreen tap.

When this timer crosses a threshold — typically 5 minutes on corporate devices, sometimes as low as 90 seconds under aggressive Group Policy — the OS takes action: it dims the display, locks the screen, or enters sleep mode. This is the mechanism that Teams, Slack, and Zoom all monitor.

Part 2: How Microsoft Teams Detects "Away"

Teams Desktop App calls the OS idle API every 60 seconds. When the returned value exceeds 5 minutes (configurable by admins), Teams sets your presence to Away. It also monitors whether the screen is locked — a locked screen always triggers Away status immediately, regardless of the idle timer value.

Teams Web App works differently. Because browsers sandbox web pages from OS-level APIs, Teams Web uses a combination of JavaScript activity detection (mouse and keyboard events within the Teams browser tab) and the Page Visibility API to determine your status. In December 2025, Microsoft added a new option: "Keep my current status when I'm active outside of Teams on the web" — enabling this under Settings → Notifications → Presence allows Teams Web to detect activity in other browser tabs.

Key insight: Browser-dispatched synthetic mouse events (new MouseEvent('mousemove')) do not affect the OS idle timer. Windows GetLastInputInfo() counts only real hardware events. This means pure pointer simulation alone is not reliable for Teams Desktop. KeepAwake addresses this with screen-level techniques.

Part 3: KeepAwake's 5 Techniques

Technique 1: Screen Wake Lock API ✅ Most Reliable

The Screen Wake Lock API (navigator.wakeLock.request('screen')) is a W3C web standard that allows a browser page to request the OS keep the display active. When a Wake Lock is held, the OS suppresses all screen-dimming and sleep timers — the same timers Teams monitors. This is the most direct and reliable method available in a browser.

Supported in: Chrome 84+, Edge 84+, Chrome for Android. Requires HTTPS. Not yet supported in Firefox or Safari (they use PiP + Audio fallback). The Wake Lock is automatically released if the tab is closed or the device runs out of battery.

Technique 2: Picture-in-Picture Video Stream ✅ Best for Minimized Browser

KeepAwake creates a 2×2 pixel animated canvas, captures it as a MediaStream via canvas.captureStream(), plays it in a <video> element, and enters Picture-in-Picture mode. The PiP window floats above all other applications — managed at the OS display compositor level, not the browser level.

Because the OS sees an actively playing video, it treats the system as in-use and suspends idle detection. This technique works even when the browser window is fully minimized and is particularly powerful for Teams Desktop users who need their browser backgrounded. It's the recommended technique for the most reliable always-green Teams status.

Technique 3: AudioContext Silent Tone

An AudioContext is created with an oscillator generating a 40Hz tone at near-zero gain (0.0001 volume — effectively inaudible). An active audio context signals to the OS that media is playing, which on most platforms prevents the idle state. This is especially effective on macOS, where audio session activity is a strong idle inhibitor.

Technique 4: Web Worker Heartbeat

Browser tabs are subject to CPU throttling when backgrounded — the browser reduces the frequency of setInterval calls to save battery. Web Workers run in a separate thread and are not subject to this throttling. KeepAwake creates an inline Web Worker (via Blob URL) that fires a heartbeat tick at your chosen interval, reliably triggering the pointer simulation even when the tab has been in the background for hours.

Technique 5: Canvas Animation Loop

A hidden 2×2 pixel <canvas> element runs a continuous requestAnimationFrame loop, redrawing a single pixel every frame. This keeps the browser rendering thread active. While it doesn't directly affect the OS idle timer, it ensures the browser itself never enters a suspended state, which supports the other techniques.

Why Some Techniques Work Better Than Others

The effectiveness of each technique depends on your browser, OS, corporate policies, and whether you're using Teams Desktop or Teams Web:

TechniqueTeams DesktopTeams WebBrowser Minimized
Wake Lock API✓ Excellent✓ Excellent✓ Works
Picture-in-Picture✓ Excellent✓ Good✓ Excellent
AudioContext✓ Good✓ Good⚠ Partial
Web WorkerSupplementary✓ Good✓ Excellent
Pointer SimulationLimited*⚠ PartialLimited

* Pointer simulation does not affect OS-level GetLastInputInfo(). It provides supplementary browser-level activity only.

Honest Limitations

No browser tool can override every corporate security configuration. These scenarios may prevent KeepAwake from working:

  • Group Policy forcing screen lock: If your IT department uses Windows Group Policy to force a screen lock after N minutes of OS idle time, this overrides browser-level wake locks entirely. The OS will lock the screen regardless.
  • Advanced endpoint monitoring: Tools like Teramind, ActivTrak, or Veriato track keystroke frequency and active application focus — not just idle time. These won't be affected by KeepAwake.
  • Firefox and Safari: No Wake Lock API support yet. KeepAwake falls back to PiP + AudioContext + Canvas, which is still effective on most systems but less guaranteed than Chrome/Edge.
  • Browser power saving: Some browsers (especially on battery-saving mode) may throttle background tabs aggressively. This is why the Web Worker technique is critical — it's immune to tab throttling.

What to Do If Teams Still Shows Away

  1. Use Chrome or Edge for Wake Lock API support
  2. Click Allow when KeepAwake requests Picture-in-Picture permission
  3. If using Teams Web: enable "Keep my current status when active outside Teams" in Teams Settings → Notifications & Activity → Presence
  4. Check your Windows Power Settings: set both "Turn off display" and "Put computer to sleep" to Never while KeepAwake is running
  5. For corporate devices: check if Group Policy is overriding your power settings (IT can confirm this)