[GH-ISSUE #5944] [bug]: Hotkeys. Use event.code instead event.key #2336

Open
opened 2026-03-17 00:00:32 +03:00 by kerem · 1 comment
Owner

Originally created by @veatla on GitHub (Mar 5, 2026).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5944

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Platform

Desktop App

Browser

Firefox

Operating System

Windows

Bug Description

What happened?

When I click keys for example "R" to create new request but my language on system is different - nothing happens
I looked up on some code and it's seems to that app uses event.key rather than event.code
for example:

      if (e.key === "k" && (e.ctrlKey || e.metaKey)) {
            e.preventDefault();
            this.copyRequest();
      }

Should be e.code === "KeyK"

What I expect is to check shortcuts by event.code

Also it'll be great if hotkeys would work without opening context menu for example with Ctrl/Mod + (Shift) + (Alt) + <key>
Mine suggestion is to use File System shortcuts to rename with F2, to create request Ctrl + KeyN, to create folder Ctrl + Shift + KeyN, etc.

Steps to reproduce

  1. Open app
  2. Change keyboard language which in my case is Russian
  3. Click on tree dots to open context menu
  4. Try to use Shortcuts

Deployment Type

Hoppscotch Cloud

Version

v2026.2.0

Originally created by @veatla on GitHub (Mar 5, 2026). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5944 ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Desktop App ### Browser Firefox ### Operating System Windows ### Bug Description ## What happened? When I click keys for example "R" to create new request but my language on system is different - nothing happens I looked up on some code and it's seems to that app uses **event.key** rather than **event.code** for example: ```javascript if (e.key === "k" && (e.ctrlKey || e.metaKey)) { e.preventDefault(); this.copyRequest(); } ``` Should be `e.code === "KeyK"` ## What I expect is to check shortcuts by event.code Also it'll be great if hotkeys would work without opening context menu for example with `Ctrl/Mod + (Shift) + (Alt) + <key>` Mine suggestion is to use File System shortcuts to rename with F2, to create request `Ctrl + KeyN`, to create folder `Ctrl + Shift + KeyN`, etc. ## Steps to reproduce 1. Open app 2. Change keyboard language which in my case is Russian 3. Click on tree dots to open context menu 4. Try to use Shortcuts ### Deployment Type Hoppscotch Cloud ### Version v2026.2.0
Author
Owner

@VishwaVikas2006 commented on GitHub (Mar 12, 2026):

Hi, I'd like to work on this issue. I'll try reproducing it locally and submit a fix.

<!-- gh-comment-id:4044335149 --> @VishwaVikas2006 commented on GitHub (Mar 12, 2026): Hi, I'd like to work on this issue. I'll try reproducing it locally and submit a fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2336
No description provided.