Skip to content

fix(web): use platform-specific modifier key for search shortcut#1372

Merged
RealKai42 merged 3 commits intomainfrom
feat/platform-modifier-helper
Mar 9, 2026
Merged

fix(web): use platform-specific modifier key for search shortcut#1372
RealKai42 merged 3 commits intomainfrom
feat/platform-modifier-helper

Conversation

@YoungY620
Copy link
Copy Markdown
Collaborator

@YoungY620 YoungY620 commented Mar 9, 2026

Related Issue

N/A

Description

Fix Cmd+F / Ctrl+F search shortcut using e.metaKey || e.ctrlKey, which incorrectly accepts both modifier keys on all platforms. On macOS, Ctrl+F should not trigger search; on Windows/Linux, Cmd (meta) key should not trigger search.

Now uses platform-specific modifier: Cmd on macOS, Ctrl elsewhere. Extracted a shared hasPlatformModifier(e) utility to consolidate the repeated pattern across chat-conversation.tsx and sessions.tsx, with cached platform detection to avoid recalculating on every keydown.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Consolidate the repeated `isMacOS() ? e.metaKey : e.ctrlKey` pattern
into a shared utility with cached platform detection.
devin-ai-integration[bot]

This comment was marked as resolved.

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