[PR #22403] [CLOSED] feat: add keyboard shortcuts for playground and edit last message #42290

Closed
opened 2026-04-25 14:14:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22403
Author: @Br1an67
Created: 3/8/2026
Status: Closed

Base: mainHead: feat/issue-1008-keyboard-shortcuts


📝 Commits (1)

  • 6954f88 feat: add keyboard shortcuts for playground and edit last message

📊 Changes

3 files changed (+91 additions, -2 deletions)

View changed files

📝 src/lib/components/playground/Chat.svelte (+54 -1)
📝 src/lib/shortcuts.ts (+33 -1)
📝 src/routes/(app)/+layout.svelte (+4 -0)

📄 Description

Fixes #1008

Summary

This PR adds keyboard shortcuts to improve the user experience in both the Playground and the main chat interface. It addresses the issue of having limited shortcuts and uses more ergonomic two-key combinations for frequently used actions.

Changes

  • Added Playground keyboard shortcuts:
    • Ctrl/Cmd+Enter - Submit and generate response
    • Ctrl/Cmd+Shift+Enter - Add message to conversation
    • Ctrl/Cmd+Shift+R - Toggle between user and assistant role
  • Added main chat shortcut:
    • Ctrl/Cmd+E - Edit last user message (works regardless of input state)
  • All shortcuts registered in shortcuts.ts with proper categories and tooltips

Testing

  • Verified shortcut definitions in shortcuts.ts are correctly formatted
  • Verified Playground Chat.svelte has proper event listener setup with cleanup on destroy
  • Verified +layout.svelte has correct handler for edit last message
  • Follows existing patterns in the codebase for shortcut implementation

Files Changed

 .branch_name                              |  1 +
 src/lib/components/playground/Chat.svelte | 55 ++++++++++++++++++++++++++++++-
 src/lib/shortcuts.ts                      | 34 ++++++++++++++++++-
 src/routes/(app)/+layout.svelte           |  4 +++
 4 files changed, 92 insertions(+), 2 deletions(-)

Changelog Entry

Description

Added keyboard shortcuts for Playground and a dedicated shortcut for editing the last message in the main chat.

Added

  • Ctrl/Cmd+Enter - Submit in Playground
  • Ctrl/Cmd+Shift+Enter - Add message in Playground
  • Ctrl/Cmd+Shift+R - Toggle role (user/assistant) in Playground
  • Ctrl/Cmd+E - Edit last user message in main chat

Changed

  • Extended the Shortcut enum in shortcuts.ts to include Playground shortcuts
  • Extended the shortcuts registry with new Playground category

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22403 **Author:** [@Br1an67](https://github.com/Br1an67) **Created:** 3/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/issue-1008-keyboard-shortcuts` --- ### 📝 Commits (1) - [`6954f88`](https://github.com/open-webui/open-webui/commit/6954f8894acfb75696937330e2bd815fa9da8045) feat: add keyboard shortcuts for playground and edit last message ### 📊 Changes **3 files changed** (+91 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/playground/Chat.svelte` (+54 -1) 📝 `src/lib/shortcuts.ts` (+33 -1) 📝 `src/routes/(app)/+layout.svelte` (+4 -0) </details> ### 📄 Description Fixes #1008 ## Summary This PR adds keyboard shortcuts to improve the user experience in both the Playground and the main chat interface. It addresses the issue of having limited shortcuts and uses more ergonomic two-key combinations for frequently used actions. ## Changes - Added Playground keyboard shortcuts: - `Ctrl/Cmd+Enter` - Submit and generate response - `Ctrl/Cmd+Shift+Enter` - Add message to conversation - `Ctrl/Cmd+Shift+R` - Toggle between user and assistant role - Added main chat shortcut: - `Ctrl/Cmd+E` - Edit last user message (works regardless of input state) - All shortcuts registered in shortcuts.ts with proper categories and tooltips ## Testing - Verified shortcut definitions in shortcuts.ts are correctly formatted - Verified Playground Chat.svelte has proper event listener setup with cleanup on destroy - Verified +layout.svelte has correct handler for edit last message - Follows existing patterns in the codebase for shortcut implementation ## Files Changed ``` .branch_name | 1 + src/lib/components/playground/Chat.svelte | 55 ++++++++++++++++++++++++++++++- src/lib/shortcuts.ts | 34 ++++++++++++++++++- src/routes/(app)/+layout.svelte | 4 +++ 4 files changed, 92 insertions(+), 2 deletions(-) ``` # Changelog Entry ### Description Added keyboard shortcuts for Playground and a dedicated shortcut for editing the last message in the main chat. ### Added - `Ctrl/Cmd+Enter` - Submit in Playground - `Ctrl/Cmd+Shift+Enter` - Add message in Playground - `Ctrl/Cmd+Shift+R` - Toggle role (user/assistant) in Playground - `Ctrl/Cmd+E` - Edit last user message in main chat ### Changed - Extended the Shortcut enum in shortcuts.ts to include Playground shortcuts - Extended the shortcuts registry with new Playground category --- ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 14:14:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#42290