Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix(selfhost-web): restore numpad support for first/last tab shortcuts

James George37b06fb07e66
diff --git a/packages/hoppscotch-selfhost-web/src/main.ts b/packages/hoppscotch-selfhost-web/src/main.ts
index 2cc0c94e1..9cb82be02 100644
--- a/packages/hoppscotch-selfhost-web/src/main.ts
+++ b/packages/hoppscotch-selfhost-web/src/main.ts
@@ -342,7 +342,8 @@ async function initApp() {
isCtrlOrCmd &&
!e.shiftKey &&
e.altKey &&
- e.code === "Digit9"
+ (e.code === "Digit9" ||
+ (e.code === "Numpad9" && e.getModifierState("NumLock")))
) {
// Ctrl/Cmd + Alt + 9 - First Tab
e.preventDefault()
@@ -353,7 +354,8 @@ async function initApp() {
isCtrlOrCmd &&
!e.shiftKey &&
e.altKey &&
- e.code === "Digit0"
+ (e.code === "Digit0" ||
+ (e.code === "Numpad0" && e.getModifierState("NumLock")))
) {
// Ctrl/Cmd + Alt + 0 - Last Tab
e.preventDefault()