[PR #65] [CLOSED] Add handling of digit and letter shortcuts by their code #79

Closed
opened 2026-03-03 15:57:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mrgoonie/winshot/pull/65
Author: @hisbvdis
Created: 12/29/2025
Status: Closed

Base: mainHead: feature/add-handling-digit-and-letter-shortcuts-by-their-code


📝 Commits (1)

  • b9f4cce Add handling of digit and letter shortcuts by their code

📊 Changes

1 file changed (+4 additions, -3 deletions)

View changed files

📝 frontend/src/components/hotkey-input.tsx (+4 -3)

📄 Description

Hello.

I'm not very experienced developer, but do you think using of e.key code for handling hotkeys is a good idea?
So far I encountered some issues because of this.

For example, when I want to set Ctrl+Shift+2 shortcut, it is recognized as a Ctrl+Shift+@ and doesn't work.
And other keyboard language layouts might set wrong characters.

Image

I made a small change, that uses e.code (not e.key) to handle shortcuts.
And shortcuts like Ctrl+Shift+2 started working.

Image

And I was wondering, maybe it would be better to only use e.code in when handling hotkeys?
What do you think?


🔄 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/mrgoonie/winshot/pull/65 **Author:** [@hisbvdis](https://github.com/hisbvdis) **Created:** 12/29/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/add-handling-digit-and-letter-shortcuts-by-their-code` --- ### 📝 Commits (1) - [`b9f4cce`](https://github.com/mrgoonie/winshot/commit/b9f4cce3a0d7f9f06399199728ee2a7d2a5fcc9e) Add handling of digit and letter shortcuts by their code ### 📊 Changes **1 file changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/hotkey-input.tsx` (+4 -3) </details> ### 📄 Description Hello. I'm not very experienced developer, but do you think using of `e.key` code for handling hotkeys is a good idea? So far I encountered some issues because of this. For example, when I want to set `Ctrl+Shift+2` shortcut, it is recognized as a `Ctrl+Shift+@` and doesn't work. And other keyboard language layouts might set wrong characters. <img width="240" height="auto" alt="Image" src="https://github.com/user-attachments/assets/bd2a9069-a0f8-4e3b-9a7c-47f600f2fb7b" /> I made a small change, that uses `e.code` (not `e.key`) to handle shortcuts. And shortcuts like `Ctrl+Shift+2` started working. <img width="240" height="auto" alt="Image" src="https://github.com/user-attachments/assets/d9c4efe1-5cb5-47eb-b367-76c5b86f07d7" /> And I was wondering, maybe it would be better to only use `e.code` in when handling hotkeys? What do you think? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:57:40 +03:00
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/winshot#79
No description provided.