Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 12, 2025

Implements 10 new keyboard shortcuts to improve productivity when creating learning maps, as requested in #[issue_number].

New Keyboard Shortcuts

Zoom Controls

  • Ctrl + + - Zoom in
  • Ctrl + - - Zoom out
  • Ctrl + 0 - Reset zoom to 1:1 with smooth animation

View Controls

  • Shift + 1 - Fit all elements in view
  • Shift + 2 - Zoom to fit selected nodes

Editing Controls

  • Ctrl + X - Cut selected nodes and edges
  • Ctrl + C - Copy selected nodes and edges
  • Ctrl + V - Paste with automatic offset and unique ID generation

Workspace Controls

  • Ctrl + ' - Toggle background grid visibility
  • Ctrl + Delete - Reset map (clear all nodes and edges with confirmation)

Implementation Details

All shortcuts have been added to the help dialog (Ctrl + ?) and are fully internationalized in both English and German.

The cut/copy/paste functionality intelligently handles multiple nodes, preserves edges between copied nodes, generates new unique IDs, and offsets pasted nodes by 50px to prevent overlap.

Zoom controls use ReactFlow's native methods with smooth 300ms animations for a polished user experience.

Breaking Change ⚠️

The Add Text Node shortcut has been changed from Ctrl + X to Ctrl + T to free up Ctrl + X for the standard Cut operation. This change is documented in the updated help dialog.

Testing

  • ✅ TypeScript compilation passes
  • ✅ All existing tests pass
  • ✅ Build successful
  • ✅ Follows existing code patterns and conventions
  • ✅ Full i18n support (English & German)

Closes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Keyboard shortcuts</issue_title>
<issue_description>Here should be more keyboard shortcuts for creating learningmaps faster. Here is a list:

💡 Proposed Shortcuts

Action Shortcut
Zoom in Ctrl + +
Zoom out Ctrl + -
Reset zoom Ctrl + 0
Zoom to fit all elements Shift + 1
Zoom to selection Shift + 2
Toggle grid Ctrl + '
Reset the learning map (delete everything) Ctrl + Delete
Cut Ctrl + X
Copy Ctrl + C
Paste Ctrl + V

These also need to be added to the help dialog.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #9


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Oct 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
learningmap Ready Ready Preview Comment Oct 12, 2025 10:26pm

Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Copilot AI changed the title [WIP] Add keyboard shortcuts for learning maps creation Add keyboard shortcuts for zoom, grid, reset, and cut/copy/paste operations Oct 12, 2025
Copilot AI requested a review from mikebarkmin October 12, 2025 21:25
@mikebarkmin mikebarkmin marked this pull request as ready for review October 12, 2025 22:26
@mikebarkmin mikebarkmin merged commit 62ad545 into main Oct 12, 2025
3 checks passed
@mikebarkmin mikebarkmin deleted the copilot/add-keyboard-shortcuts branch October 12, 2025 22:58
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.

Keyboard shortcuts

2 participants