# Add feature to lock screen during workout

**URL:** <https://forum.repebble.com/t/add-feature-to-lock-screen-during-workout/791>\
**Category:** Product Feedback\
**Created:** [May 31, 2026, 10:08pm UTC](https://forum.repebble.com/t/add-feature-to-lock-screen-during-workout/791 "2026-05-31T22:08:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebodes](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.repebble.com/ebodes/32/540_2.png) [@ebodes](https://forum.repebble.com/u/ebodes)\
**Post date:** [May 31, 2026, 10:08pm UTC](https://forum.repebble.com/t/add-feature-to-lock-screen-during-workout/791/1 "2026-05-31T22:08:27Z")

</div>

On other smartwatches I’ve used I’ve been able to lock the screen from touches and button presses until a specific combination of buttons are pressed, or a button is pressed for a duration of time.

Sweat can activate the screen unintentionally during a workout and workout equipment can bump the buttons, ending the workout early. My friends and I all wear smartwatches while we play hockey to track our exercise but if we forget to lock the screen the workout always ends unintentionally within ten minutes because our gloves have accidentally pushed the right buttons to end the workout.

I would suggest a combination of buttons be held for 3 seconds to unlock the screen. Preferably one button on either side of the watch (back + up) or as a less ideal option the up + down buttons be held. The apple watch also uses this unlock sequence to play a noise through the speaker of the watch intending to dispel any sweat or water that found its way in there during the workout. Idk how necessary that is, but might be something to consider.

---

<div class="post-metadata">

**Author:** ![unki](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.repebble.com/unki/32/900_2.png) [@unki](https://forum.repebble.com/u/unki)\
**Post date:** [July 31, 2026, 6:19pm UTC](https://forum.repebble.com/t/add-feature-to-lock-screen-during-workout/791/2 "2026-07-31T18:19:58Z")

</div>

I also miss this feature, I keep hitting one of the buttons during work easily.

I have a first implementation here:

> <https://github.com/unki/PebbleOS/pull/1>
>
> \# fw: add Button Lock (hold Back+Down to lock all input)
> 
> \## Summary
> 
> Adds a…n opt-in \*\*Button Lock\*\* feature: holding \*\*Back + Down\*\* for a
> configurable duration locks all button input (and the touchscreen on
> touch-capable boards); holding the same combo again unlocks. This prevents
> accidental actions — scrolling notifications away, launching apps, dismissing
> alarms — while the watch is worn during sports, sleep, or when it brushes
> against a sleeve.
> 
> The feature is off by default and enabled via \*\*Settings → System → Button
> Lock\*\*, where the hold duration is chosen from Off / 1 / 2 / 3 / 5 / 10
> seconds.
> 
> \## User experience
> 
> \- Hold Back+Down for the configured time → short vibe + "Buttons Locked"
> popup. All input is now ignored.
> \- Press any button while locked → brief hint popup (backlight still works):
> 
> \`\`\`
> ┌───────────────────────┐
> │ │
> │ Hold Back + Down │
> │ to unlock │
> │ │
> │ (dismisses │
> │ after ~2 seconds) │
> └───────────────────────┘
> \`\`\`
> 
> \- Hold Back+Down again → double vibe + "Buttons Unlocked" popup, input works
> again.
> 
> \`\`\`
> ┌───────────────────────┐ ┌───────────────────────┐
> │ │ │ │
> │ Buttons Locked │ │ Buttons Unlocked │
> │ │ │ │
> └───────────────────────┘ └───────────────────────┘
> on lock (short vibe) on unlock (double vibe)
> \`\`\`
> 
> The popups are plain text \`SimpleDialog\`s on the \`ModalPriorityAlert\` modal
> stack with a 1.8 s timeout (matching ActionToggle's result timeout), pushed
> from KernelMain. Alert outranks notifications and the incoming-call UI, so
> the feedback stays visible when one of those is on screen, while remaining
> below BT pairing requests and alarms, which must never be hidden by a lock
> toast.
> 
> \## Lock process
> 
> \*\*Locking:\*\*
> 
> \`\`\`mermaid
> %%{init: {'theme': 'base', 'themeVariables': {'fontSize': '18px', 'lineColor': '#8a8a8a', 'textColor': '#333333', 'edgeLabelBackground': '#e8e8e8', 'noteBkgColor': '#fff3c4', 'noteTextColor': '#5c4a00', 'noteBorderColor': '#d4b106'}}}%%
> stateDiagram-v2
> direction LR
> 
> classDef unlocked fill:#a5d6a7,stroke:#2e7d32,color:#1b5e20
> classDef pending fill:#ffe082,stroke:#f57f17,color:#7a4f01
> classDef locked fill:#ef9a9a,stroke:#c62828,color:#7f1d1d
> 
> state "Combo pending" as Pending
> 
> \[\*\] --\> Unlocked
> Unlocked --\> Pending : Back+Down both held (feature enabled)
> Pending --\> Unlocked : released early / third button pressed
> Pending --\> Locked : hold timer fires (short vibe + "Buttons Locked")
> Locked --\> Locked : any button press → swallowed, hint popup
> 
> note right of Pending
> force-quit timer cancelled,
> watchface click recognizers reset,
> hold timer armed (1-10 s),
> further DOWNs swallowed
> end note
> 
> note right of Locked
> button events masked from every task,
> touch sensor disabled,
> backlight and HW reset combo still work
> end note
> 
> class Unlocked unlocked
> class Pending pending
> class Locked locked
> \`\`\`
> 
> \*\*Unlocking:\*\*
> 
> \`\`\`mermaid
> %%{init: {'theme': 'base', 'themeVariables': {'fontSize': '18px', 'lineColor': '#8a8a8a', 'textColor': '#333333', 'edgeLabelBackground': '#e8e8e8', 'noteBkgColor': '#fff3c4', 'noteTextColor': '#5c4a00', 'noteBorderColor': '#d4b106'}}}%%
> stateDiagram-v2
> direction LR
> 
> classDef unlocked fill:#a5d6a7,stroke:#2e7d32,color:#1b5e20
> classDef pending fill:#ffe082,stroke:#f57f17,color:#7a4f01
> classDef locked fill:#ef9a9a,stroke:#c62828,color:#7f1d1d
> 
> state "Combo pending" as PendingU
> 
> Locked --\> PendingU : Back+Down both held
> PendingU --\> Locked : released early / third button pressed
> PendingU --\> Unlocked : hold timer fires (double vibe + "Buttons Unlocked")
> 
> note right of PendingU
> same 1-10 s hold timer;
> works with a notification
> or call on screen
> end note
> 
> note right of Unlocked
> touch restored to the
> persisted user pref
> end note
> 
> class Unlocked unlocked
> class PendingU pending
> class Locked locked
> \`\`\`
> 
> A continuous hold toggles exactly once; the combo must be fully released
> before it can trigger again.
> 
> \## Implementation
> 
> \- \*\*\`src/fw/shell/normal/button\_lock.c\` (new)\*\* — self-contained state
> machine, patterned after the PRF \`getting\_started\_button\_combo\` monitor:
> a held-buttons bitset plus a \`new\_timer\` for the hold, toggling on
> KernelMain via \`launcher\_task\_add\_callback()\`.
> \- \*\*Kernel hook\*\* — every button event passes through
> \`launcher\_handle\_button\_event()\`; the module is consulted first and, when
> it swallows an event, the full \`task\_mask\` is set so no task (app, modal,
> watchface, event-service subscribers) sees it.
> \- \*\*Recognizer consistency\*\* — a button UP is delivered iff its DOWN was
> delivered, so click recognizers never see an unbalanced press. When the
> combo forms on the watchface, the click manager is reset (same as the
> existing Quick Launch combos) so the first button's 400 ms long-click can't
> fire mid-hold. The back-button force-quit timer is cancelled when the combo
> becomes pending, so locking inside an app doesn't force-quit it.
> \- \*\*Touch\*\* (touch-capable boards, e.g. Pebble Time 2) — locking calls the
> existing \`touch\_service\_set\_globally\_enabled(false)\` kill switch; unlocking
> restores the \*persisted\* touch preference rather than blindly enabling. A
> phone-side write of the touch pref while locked only updates the pref, so
> it cannot re-enable the sensor mid-lock.
> \- \*\*Pref\*\* — single \`buttonLockHoldMs\` shell pref (\`0\` = disabled, default);
> the handler rejects values not offered by the UI. Not added to the phone
> sync whitelist for now.
> \- \*\*Safety\*\* — locked state is RAM-only (reboot always unlocks), PRF/SDK
> shells get inert stubs, and the hardware reset combo is handled at ISR
> level in the button driver, below anything the lock can mask.
> 
> \## Testing
> 
> \- New clar suite \`tests/fw/shell/normal/test\_button\_lock.c\` (11 cases):
> combo detection, configurable hold duration, abort on early release or a
> third button, swallowing + hint popup while locked, touch restoration to
> the persisted pref, exactly-one-toggle per continuous hold, and the
> timer-fires-after-release race.
> \- Full \`./pbl test\` suite passes.
> \- Verified end-to-end in QEMU (\`qemu\_gabbro\`): settings round-trip, lock,
> hint popup on keypress while locked, unlock, normal input afterwards.
> \- Firmware builds for \`obelix@pvt\` (normal) and \`qemu\_gabbro\`; the PRF link
> failures for \`obelix@pvt\` are pre-existing on \`main\` and unchanged by this
> series.
> 
> \## Commits
> 
> 1. 0efaea7a \`fw/shell: add button lock hold duration preference\`
> 2. 291a8f5a \`fw/shell/normal: add button lock service\`
> 3. a03d1327 \`fw/apps/settings: add Button Lock option to System settings\`
> 4. 6531af45 \`tests/fw/shell/normal: add button lock unit test\`
> 5. 4e69c5d7 \`fw/shell/normal: raise button lock popups above notifications\`
> 
> 🤖 Generated with \[Claude Code\](https://claude.com/claude-code)

It will lock/unlock with the left back- and the right down-button pressed together.

Battle-testing it currently on my Time 2.

---

<div class="post-metadata">

**Author:** ![unki](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.repebble.com/unki/32/900_2.png) [@unki](https://forum.repebble.com/u/unki)\
**Post date:** [August 4, 2026, 7:35pm UTC](https://forum.repebble.com/t/add-feature-to-lock-screen-during-workout/791/3 "2026-08-04T19:35:24Z")

</div>

It appears to work fine. The real PR is now open

> <https://github.com/coredevices/PebbleOS/pull/1838>
>
> \# fw: add Button Lock (hold Back+Down to lock all input)
> 
> \## Summary
> 
> Adds a…n opt-in \*\*Button Lock\*\* feature: holding \*\*Back + Down\*\* for a
> configurable duration locks all button input (and the touchscreen on
> touch-capable boards); holding the same combo again unlocks. This prevents
> accidental actions — scrolling notifications away, launching apps, dismissing
> alarms — while the watch is worn during sports, sleep, or when it brushes
> against a sleeve.
> 
> The feature is off by default and enabled via \*\*Settings → System → Button
> Lock\*\*, where the hold duration is chosen from Off / 1 / 2 / 3 / 5 / 10
> seconds.
> 
> \## User experience
> 
> \- Hold Back+Down for the configured time → short vibe + "Buttons Locked"
> popup. All input is now ignored.
> \- Press any button while locked → brief hint popup (backlight still works):
> 
> \`\`\`
> ┌───────────────────────┐
> │ │
> │ Hold Back + Down │
> │ to unlock │
> │ │
> │ (dismisses │
> │ after ~2 seconds) │
> └───────────────────────┘
> \`\`\`
> 
> \- Hold Back+Down again → double vibe + "Buttons Unlocked" popup, input works
> again.
> 
> \`\`\`
> ┌───────────────────────┐ ┌───────────────────────┐
> │ │ │ │
> │ Buttons Locked │ │ Buttons Unlocked │
> │ │ │ │
> └───────────────────────┘ └───────────────────────┘
> on lock (short vibe) on unlock (double vibe)
> \`\`\`
> 
> The popups are plain text \`SimpleDialog\`s on the \`ModalPriorityAlert\` modal
> stack with a 1.8 s timeout (matching ActionToggle's result timeout), pushed
> from KernelMain. Alert outranks notifications and the incoming-call UI, so
> the feedback stays visible when one of those is on screen, while remaining
> below BT pairing requests and alarms, which must never be hidden by a lock
> toast.
> 
> \## Lock process
> 
> \*\*Locking:\*\*
> 
> \`\`\`mermaid
> %%{init: {'theme': 'base', 'themeVariables': {'fontSize': '18px', 'lineColor': '#8a8a8a', 'textColor': '#333333', 'edgeLabelBackground': '#e8e8e8', 'noteBkgColor': '#fff3c4', 'noteTextColor': '#5c4a00', 'noteBorderColor': '#d4b106'}}}%%
> stateDiagram-v2
> direction LR
> 
> classDef unlocked fill:#a5d6a7,stroke:#2e7d32,color:#1b5e20
> classDef pending fill:#ffe082,stroke:#f57f17,color:#7a4f01
> classDef locked fill:#ef9a9a,stroke:#c62828,color:#7f1d1d
> 
> state "Combo pending" as Pending
> 
> \[\*\] --\> Unlocked
> Unlocked --\> Pending : Back+Down both held (feature enabled)
> Pending --\> Unlocked : released early / third button pressed
> Pending --\> Locked : hold timer fires (short vibe + "Buttons Locked")
> Locked --\> Locked : any button press → swallowed, hint popup
> 
> note right of Pending
> force-quit timer cancelled,
> watchface click recognizers reset,
> hold timer armed (1-10 s),
> further DOWNs swallowed
> end note
> 
> note right of Locked
> button events masked from every task,
> touch sensor disabled,
> backlight and HW reset combo still work
> end note
> 
> class Unlocked unlocked
> class Pending pending
> class Locked locked
> \`\`\`
> 
> \*\*Unlocking:\*\*
> 
> \`\`\`mermaid
> %%{init: {'theme': 'base', 'themeVariables': {'fontSize': '18px', 'lineColor': '#8a8a8a', 'textColor': '#333333', 'edgeLabelBackground': '#e8e8e8', 'noteBkgColor': '#fff3c4', 'noteTextColor': '#5c4a00', 'noteBorderColor': '#d4b106'}}}%%
> stateDiagram-v2
> direction LR
> 
> classDef unlocked fill:#a5d6a7,stroke:#2e7d32,color:#1b5e20
> classDef pending fill:#ffe082,stroke:#f57f17,color:#7a4f01
> classDef locked fill:#ef9a9a,stroke:#c62828,color:#7f1d1d
> 
> state "Combo pending" as PendingU
> 
> Locked --\> PendingU : Back+Down both held
> PendingU --\> Locked : released early / third button pressed
> PendingU --\> Unlocked : hold timer fires (double vibe + "Buttons Unlocked")
> 
> note right of PendingU
> same 1-10 s hold timer;
> works with a notification
> or call on screen
> end note
> 
> note right of Unlocked
> touch restored to the
> persisted user pref
> end note
> 
> class Unlocked unlocked
> class PendingU pending
> class Locked locked
> \`\`\`
> 
> A continuous hold toggles exactly once; the combo must be fully released
> before it can trigger again.
> 
> \## Implementation
> 
> \- \*\*\`src/fw/shell/normal/button\_lock.c\` (new)\*\* — self-contained state
> machine, patterned after the PRF \`getting\_started\_button\_combo\` monitor:
> a held-buttons bitset plus a \`new\_timer\` for the hold, toggling on
> KernelMain via \`launcher\_task\_add\_callback()\`.
> \- \*\*Kernel hook\*\* — every button event passes through
> \`launcher\_handle\_button\_event()\`; the module is consulted first and, when
> it swallows an event, the full \`task\_mask\` is set so no task (app, modal,
> watchface, event-service subscribers) sees it.
> \- \*\*Recognizer consistency\*\* — a button UP is delivered iff its DOWN was
> delivered, so click recognizers never see an unbalanced press. When the
> combo forms on the watchface, the click manager is reset (same as the
> existing Quick Launch combos) so the first button's 400 ms long-click can't
> fire mid-hold. The back-button force-quit timer is cancelled when the combo
> becomes pending, so locking inside an app doesn't force-quit it.
> \- \*\*Touch\*\* (touch-capable boards, e.g. Pebble Time 2) — locking calls the
> existing \`touch\_service\_set\_globally\_enabled(false)\` kill switch; unlocking
> restores the \*persisted\* touch preference rather than blindly enabling. A
> phone-side write of the touch pref while locked only updates the pref, so
> it cannot re-enable the sensor mid-lock.
> \- \*\*Pref\*\* — single \`buttonLockHoldMs\` shell pref (\`0\` = disabled, default);
> the handler rejects values not offered by the UI. Not added to the phone
> sync whitelist for now.
> \- \*\*Safety\*\* — locked state is RAM-only (reboot always unlocks), PRF/SDK
> shells get inert stubs, and the hardware reset combo is handled at ISR
> level in the button driver, below anything the lock can mask.
> 
> \## Testing
> 
> \- New clar suite \`tests/fw/shell/normal/test\_button\_lock.c\` (11 cases):
> combo detection, configurable hold duration, abort on early release or a
> third button, swallowing + hint popup while locked, touch restoration to
> the persisted pref, exactly-one-toggle per continuous hold, and the
> timer-fires-after-release race.
> \- Full \`./pbl test\` suite passes.
> \- Verified end-to-end in QEMU (\`qemu\_gabbro\`): settings round-trip, lock,
> hint popup on keypress while locked, unlock, normal input afterwards.
> \- Firmware builds for \`obelix@pvt\` (normal) and \`qemu\_gabbro\`; the PRF link
> failures for \`obelix@pvt\` are pre-existing on \`main\` and unchanged by this
> series.
> 
> \## Commits
> 
> 1. 0efaea7a \`fw/shell: add button lock hold duration preference\`
> 2. 291a8f5a \`fw/shell/normal: add button lock service\`
> 3. a03d1327 \`fw/apps/settings: add Button Lock option to System settings\`
> 4. 6531af45 \`tests/fw/shell/normal: add button lock unit test\`
> 5. 4e69c5d7 \`fw/shell/normal: raise button lock popups above notifications\`
> 
> 🤖 Generated with \[Claude Code\](https://claude.com/claude-code)

---

<div class="post-metadata">

**Author:** ![chiraag](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@chiraag](https://forum.repebble.com/u/chiraag)\
**Post date:** [September 24, 2026, 4:24pm UTC](https://forum.repebble.com/t/add-feature-to-lock-screen-during-workout/791/4 "2026-09-24T16:24:42Z")

</div>

Yess…I need this too. I’ve definitely run into issues with accidentally triggering stuff during a workout, so getting this merged will be great 🙂
