mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #18256] [CLOSED] feat: add toggleable hotkey hints to sidebar buttons and refac ShortcutsModal #24728
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18256
Author: @silentoplayz
Created: 10/12/2025
Status: ❌ Closed
Base:
dev← Head:hotkey-hints-in-chats-sidebar📝 Commits (2)
5dbcef7feat: add toggleable hotkey hints to sidebar buttons and refac ShortcutsModal9be8403refac📊 Changes
10 files changed (+511 additions, -466 deletions)
View changed files
📝
src/lib/components/chat/MessageInput.svelte(+6 -18)📝
src/lib/components/chat/Settings/Interface.svelte(+21 -0)➕
src/lib/components/chat/ShortcutItem.svelte(+71 -0)📝
src/lib/components/chat/ShortcutsModal.svelte(+77 -351)➕
src/lib/components/common/HotkeyHint.svelte(+39 -0)📝
src/lib/components/layout/Sidebar.svelte(+8 -4)📝
src/lib/i18n/locales/en-US/translation.json(+1 -0)➕
src/lib/shortcuts.ts(+178 -0)📝
src/lib/stores/index.ts(+1 -0)📝
src/routes/(app)/+layout.svelte(+109 -93)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
Added
Shortcutenum and a mappedShortcutRegistrytype insrc/lib/shortcuts.tsfor improved type-safety and code maintainability.Changed
src/lib/shortcuts.tsto useKeyboardEvent.codevalues (e.g.,KeyK,Slash) instead ofKeyboardEvent.keyto ensure shortcuts work reliably across different keyboard layouts.src/routes/(app)/+layout.svelteto useevent.codefor detection.formatKeyfunctions inShortcutsModal.svelteandHotkeyHint.svelteto correctly translate keyboard codes back into user-friendly symbols (e.g.,KeyK->K,Slash->/).Additional Information
Screenshots or Videos
Hotkey Hints on Windows/Linux:
Hotkey Hints on MacOS:
Refactored ShortcutsModal on Windows/Linux:
Refactored ShortcutsModal on MacOS:
New
Show Sidebar Hotkey Hintstoggle: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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.