[PR #1489] [CLOSED] fix pressed key checking #3533

Closed
opened 2026-02-27 00:57:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/electerm/electerm/pull/1489
Author: @damosse31
Created: 12/31/2019
Status: Closed

Base: masterHead: fix-pressed-key


📝 Commits (1)

📊 Changes

4 files changed (+12 additions, -11 deletions)

View changed files

📝 src/client/components/session/index.jsx (+1 -1)
📝 src/client/components/sftp/index.jsx (+9 -8)
📝 src/client/components/terminal/index.jsx (+1 -1)
📝 src/client/store/index.js (+1 -1)

📄 Description

Use .key event property instead of .code to avoid differences in keyboard disposition (eg QWERTY vs AZERTY)

Example, the letter W (code = KeyW) on my AZERTY keyboard is letter Z (code KeyZ) on your QWERTY keyboard, and shortcut fail in this case.

This fix check the real character pressed as explained here : https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code


🔄 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/electerm/electerm/pull/1489 **Author:** [@damosse31](https://github.com/damosse31) **Created:** 12/31/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-pressed-key` --- ### 📝 Commits (1) - [`0977ce1`](https://github.com/electerm/electerm/commit/0977ce17c3eb814201a57a640b5149f14e790dac) fix pressed key checking ### 📊 Changes **4 files changed** (+12 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/client/components/session/index.jsx` (+1 -1) 📝 `src/client/components/sftp/index.jsx` (+9 -8) 📝 `src/client/components/terminal/index.jsx` (+1 -1) 📝 `src/client/store/index.js` (+1 -1) </details> ### 📄 Description Use .key event property instead of .code to avoid differences in keyboard disposition (eg QWERTY vs AZERTY) Example, the letter W (code = KeyW) on my AZERTY keyboard is letter Z (code KeyZ) on your QWERTY keyboard, and shortcut fail in this case. This fix check the real _character_ pressed as explained here : https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 00:57:05 +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/electerm#3533
No description provided.