Skip to content

feat: add keyboard shortcuts Ctrl+1/2/3 to switch between editor tabs#146

Open
devendra-w wants to merge 2 commits into
Debmallya-03:mainfrom
devendra-w:feat/keyboard-tab-shortcuts
Open

feat: add keyboard shortcuts Ctrl+1/2/3 to switch between editor tabs#146
devendra-w wants to merge 2 commits into
Debmallya-03:mainfrom
devendra-w:feat/keyboard-tab-shortcuts

Conversation

@devendra-w
Copy link
Copy Markdown
Contributor

Summary

Adds keyboard shortcuts to quickly switch between the HTML, CSS, and JS editor tabs without using the mouse.

Closes #141

Type of Change

  • New feature

Changes Made

  • Added Ctrl+1 / Cmd+1 → switch to HTML tab
  • Added Ctrl+2 / Cmd+2 → switch to CSS tab
  • Added Ctrl+3 / Cmd+3 → switch to JS tab
  • Shortcuts are added inside the existing keydown handler alongside Ctrl+K (command palette)

How to Test

  1. Run npm install and npm run dev
  2. Navigate to http://localhost:3000
  3. Press Ctrl+1 — verify HTML tab becomes active
  4. Press Ctrl+2 — verify CSS tab becomes active
  5. Press Ctrl+3 — verify JS tab becomes active
  6. Verify shortcuts work on Mac with Cmd+1/2/3 as well

Checklist

  • Linked issue in summary
  • Self-reviewed the diff
  • Added/updated tests if applicable

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

@devendra-w is attempting to deploy a commit to the debmallya-03's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for webifynet failed. Why did it fail? →

Name Link
🔨 Latest commit 6a5a61e
🔍 Latest deploy log https://app.netlify.com/projects/webifynet/deploys/6a169fdf9034ea00080889e4

@devendra-w
Copy link
Copy Markdown
Contributor Author

Hi @Debmallya-03! Added keyboard shortcuts Ctrl+1/2/3 (Cmd+1/2/3 on Mac) to switch between HTML, CSS, and JS editor tabs. The shortcuts are integrated into the existing keydown handler alongside Ctrl+K. I'm already familiar with the codebase from previous contributions. Ready for review!

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.

[FEAT] Add keyboard shortcuts to switch between HTML, CSS, and JS editor tabs

1 participant