Skip to content

Show Caps Lock indicator in SSH password prompt#2840

Open
0John-Hong0 wants to merge 1 commit intowavetermdev:mainfrom
0John-Hong0:ssh-password-capslock
Open

Show Caps Lock indicator in SSH password prompt#2840
0John-Hong0 wants to merge 1 commit intowavetermdev:mainfrom
0John-Hong0:ssh-password-capslock

Conversation

@0John-Hong0
Copy link

When entering an SSH password, there is no indication if Caps Lock is enabled, which can lead to failed attempts.

This adds a small Caps Lock indicator to the SSH password input.
The change is scoped only to the password prompt and does not affect behavior.

@CLAassistant
Copy link

CLAassistant commented Feb 8, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

Walkthrough

This pull request adds Caps Lock detection functionality to the user input modal component. A new state variable tracks whether Caps Lock is active, with event handlers on onKeyDown and onKeyUp that detect the Caps Lock status. When Caps Lock is detected and the input is not in public text mode, a warning message displays below the input field. The changes also include minor formatting adjustments to the checkbox label element and updated useEffect dependencies to include the new handler function.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a Caps Lock indicator to the SSH password prompt.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation, what was added, and the scope of the change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
frontend/app/modals/userinputmodal.tsx (1)

82-84: Nitpick: ?? false is redundant on getModifierState.

getModifierState() always returns a boolean, never null or undefined, so the nullish coalescing is unnecessary.

🔧 Suggested simplification
 const handleCapsLockCheck = useCallback((e: React.KeyboardEvent<HTMLInputElement>) => {
-    setCapsLockOn(e.getModifierState("CapsLock") ?? false);
+    setCapsLockOn(e.getModifierState("CapsLock"));
 }, []);

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants