Skip to content

feat(terminal): add secure keyboard entry - #357

Merged
wzz6423 merged 1 commit into
mainfrom
feat/secure-keyboard-entry
Dec 5, 2026
Merged

wzz6423 merged 1 commit into
mainfrom
feat/secure-keyboard-entry

Conversation

@wzz6423

@wzz6423 wzz6423 commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Summary

Add optional Secure Keyboard Entry to protect keyboard input while a terminal has focus. Protection follows Ghostty, Alacritty, and Quick Terminal, pauses when terminal focus ends, and releases on quit. The native menu reflects active, paused, and failure states; the choice resets on the next launch.

Document the behavior in all 17 supported languages and cover Carbon ownership, focus changes, menu actions, and application termination with targeted fixtures.

@coderabbitai summary

GitHub Project

  • Project: zshell Development
  • Start date: 2026-12-05
  • Target date: 2026-12-05

PR Type

  • Type: feat

Validation

  • Status: passed

  • Command: xcodebuild -project mac/zshell.xcodeproj -scheme zshell -configuration Debug -destination 'platform=macOS,arch=arm64' -derivedDataPath mac/build/debug ENABLE_USER_SCRIPT_SANDBOXING=NO build; codesign --verify --deep --strict --verbose=2 'mac/build/debug/Build/Products/Debug/zshell Debug.app'

  • Result: Debug build succeeded and the resulting app signature passed strict verification.

  • Status: passed

  • Command: python3 -B mac/tests/test_secure_keyboard_entry.py

  • Result: 25 lifecycle, failure, ownership, and Carbon checks passed in an independent parent-agent run.

  • Status: passed

  • Command: python3 -B mac/tests/test_secure_keyboard_entry.py --built-app 'mac/build/debug/Build/Products/Debug/zshell Debug.app' --backend libghostty

  • Result: 49 real AppKit/Carbon checks passed for Ghostty, including Quick Terminal, focus release, and termination.

  • Status: passed

  • Command: python3 -B mac/tests/test_secure_keyboard_entry.py --built-app 'mac/build/debug/Build/Products/Debug/zshell Debug.app' --backend alacritty

  • Result: 50 real AppKit/Carbon checks passed for Alacritty, including Copy Mode, the source editor, nonactivating Quick Terminal, failure recovery, and application termination.

  • Status: passed

  • Command: cd web && bun run typecheck && bun run build && bun test

  • Result: Typecheck and production build passed; 51 tests passed. All 17 generated terminal documentation pages contain the Secure Keyboard Entry section.

  • Status: passed

  • Command: python3 -B mac/tests/test_app_localization.py; git diff HEAD --check

  • Result: Both localization checks passed; added catalog strings include all 17 supported languages; no whitespace errors.

  • Status: not run

  • Reason: CI was not awaited, as requested by the maintainer. Local build and behavior checks are recorded above.

Risk and Rollback

  • Risk: Secure Keyboard Entry can affect keyboard utilities and accessibility software while active. It starts disabled, tracks process-owned Carbon holds, pauses outside terminal focus, and retries failed release without taking another hold.
  • Rollback: Revert this pull request.

Related Issue

None

AI Attribution

Co-authored-by: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@wzz6423
wzz6423 marked this pull request as ready for review December 5, 2026 05:39
@wzz6423
wzz6423 merged commit f610888 into main Dec 5, 2026
26 checks passed
@wzz6423
wzz6423 deleted the feat/secure-keyboard-entry branch December 5, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant