Clock actions, tray and accessibility

Action behavior table

SourceResultNotes
Left press and release inside an overlayOne calendar action: a single SendInput batch Win down, N down, N up, Win upMouse capture pairs press and release; release outside the slot or lost capture does nothing
A second activation within 400 msIgnoredWin+N toggles the flyout; a double click must not open and close it
Activation while Ctrl, Shift, Alt, Win or N is physically heldNothing sent, overlay unchanged, cooldown not consumedA held modifier would form a different shortcut; the user’s keys are never released by the app
SendInput inserts fewer than four eventsAccepted key-downs are released, then all overlays are hidden and Reason::ActionFailed is recorded; no retryThe native clock stays reachable. Pause then Resume (or an Explorer restart) tries again
Right click / touch press-and-hold on the overlayFixed menu at the pointerWM_CONTEXTMENU, one menu per gesture
Tray icon: context menu, mouse select, keyboard select (NIN_SELECT, NIN_KEYSELECT, WM_CONTEXTMENU)The same fixed menu at the icon’s anchorWin+B reaches the notification area from the keyboard; a menu that just closed is not reopened by the second event Windows may send
Menu SettingsPlatform::open_settings → loop → SettingsWindow::show_or_focusNever a second window
Menu Pause clock replacement / Resume clock replacementCore Event::SetPaused: every overlay is hidden (native clock shows) / shown again; tooltip reads “ElevenClock (paused)”Session only: not persisted, a new process starts running
Menu ExitQuit: overlays, tray icon, hooks and helper are removed; native clock untouchedSame path as the Settings Exit button
UIA Invoke on the overlay elementSame as a left click (queued to the UI thread)See below
Anything while paused, fullscreen-hidden, faulted, or for a stale generationIgnoredThe runtime re-checks the reducer’s OverlayState before acting

Out of scope and absent: arbitrary commands, double/middle-click customization, keyboard shortcuts beyond standard menu navigation, a duplicated notification counter, shell injection, synthetic mouse relay. The menu has exactly three commands (MenuCommand).

Calendar strategy

On tested builds, UIA Invoke on the native clock returned success without opening the flyout, while one deliberate Win+N opened it. The production action is therefore the deliberate keyboard batch only. It runs on the UI thread, needs no COM and cannot block the message loop; UIA is not used to discover or invoke the native clock from the click path. If a later build proves a supported UIA invoke, only Platform::open_calendar changes.

UI Automation provider

Keyboard access

The overlay is non-activating, so it cannot be tabbed to. Keyboard users reach Settings, Pause/Resume and Exit through the notification-area icon (registered with NOTIFYICON_VERSION_4; keyboard activation and the context-menu key open the same menu), and through Start-menu relaunch for Settings. The Win32 popup menu provides arrow keys, Enter and Escape and native UIA/MSAA exposure.

Explorer restart

Runtime calls Platform::restore_tray once at start and from check_shell, the single existing path run for TaskbarCreated and for a changed Explorer PID/creation time. There is no timer or retry of its own. If Explorer is not ready, Shell_NotifyIconW(NIM_ADD) fails quietly and the TaskbarCreated broadcast that follows tries again; a repeated restore uses NIM_MODIFY and never stacks a second icon.

Hooks for Settings, Support and UI tests

Known limitations