mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5200] [MERGED] fix(desktop): redirect menu bar events to window #5104
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5104
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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/hoppscotch/hoppscotch/pull/5200
Author: @CuriousCorrelation
Created: 6/26/2025
Status: ✅ Merged
Merged: 6/26/2025
Merged by: @jamesgeorge007
Base:
next← Head:fix-desktop-redirect-shortcuts-via-intermidiate-events📝 Commits (3)
653bbaefix(desktop): redirect menu bar events to window84ca1a8chore: clarify comment on keybind override0ff5da8fix(desktop): key match, render cycle skip for events📊 Changes
2 files changed (+110 additions, -142 deletions)
View changed files
📝
packages/hoppscotch-desktop/src-tauri/src/lib.rs(+2 -141)📝
packages/hoppscotch-selfhost-web/src/main.ts(+108 -1)📄 Description
This removes the visible menu bar from the desktop app while making sure all keyboard shortcuts work through FE event handling.
The shortcuts now work as window-focused events instead of global menu accelerators.
Closes HFE-915
The previous implementation used Tauri's native menu system which created a visible menu bar with "File", "View", and "Tabs" menus on Windows/Linux and also created a thin 1px line on MacOS.
While menu bar approach is still viable, it needs some more iterations to make sure we get it right. For now redirecting events via FE should work as a workaround in the meantime.
The implementation uses DOM keydown event listeners in the desktop-specific code block that emit
hoppscotch_desktop_shortcutevents using Tauri v2's guest-js bindings (@tauri-apps/api/event).Notes to reviewers
This change only affects desktop mode when
kernelMode === "desktop"and preserves all existing shortcut functionality. The menu bar will no longer appear on Windows/Linux while maintaining the same keyboard shortcuts users expect.Testing should verify that all shortcuts work correctly and that no menu bar is visible on desktop platforms. Have done so for MacOS and Windows, seems to have worked.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.