[PR #339] Add Windows keystroke transformation support #338

Open
opened 2026-05-05 05:13:36 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/keycastr/keycastr/pull/339
Author: @nikborovets
Created: 2/19/2026
Status: 🔄 Open

Base: mainHead: win-equivalent


📝 Commits (4)

  • 9e760bf Add Windows keystroke transformation support
  • b9ef958 Add option to show Windows equivalent keystrokes in visualizers
  • d6e2755 Disable Windows equivalent keystrokes display in KCDefaultVisualizer and SvelteVisualizer
  • cce31c2 Refine Windows keystroke display logic in KCEventTransformer

📊 Changes

9 files changed (+143 additions, -37 deletions)

View changed files

📝 keycastr/KCDefaultVisualizer.m (+14 -1)
📝 keycastr/KCDefaultVisualizer.nib/designable.nib (+32 -19)
📝 keycastr/KCDefaultVisualizer.nib/keyedobjects.nib (+0 -0)
📝 keycastr/KCEventTransformer.h (+2 -0)
📝 keycastr/KCEventTransformer.m (+43 -0)
📝 keycastr/Svelte.nib/designable.nib (+19 -6)
📝 keycastr/Svelte.nib/keyedobjects.nib (+0 -0)
📝 keycastr/SvelteVisualizer.h (+2 -0)
📝 keycastr/SvelteVisualizer.m (+31 -11)

📄 Description

Enhance KCEventTransformer to include a method for transforming keystrokes to their Windows equivalents. Update KCDefaultVisualizer to display both macOS and Windows keystroke representations when applicable.

This pull request enhances the keystroke visualization by displaying both macOS and Windows-style shortcut representations when appropriate. The main focus is on providing users with an immediate reference for cross-platform keyboard shortcuts, particularly when modifier keys are involved.

Cross-platform shortcut display improvements:

  • Added logic in KCDefaultVisualizer.m to display both the macOS and Windows-style shortcut strings side-by-side when a keystroke includes Command, Control, or Option modifiers, helping users see equivalent shortcuts at a glance.
  • Introduced a new method transformedValueForWindows: in KCEventTransformer to generate Windows-style shortcut strings based on the keystroke's modifier flags and key code. [1] [2]
  • Updated imports in KCDefaultVisualizer.m to include the new KCEventTransformer dependency.
Screenshot 2026-02-19 at 21 39 24 Screenshot 2026-02-19 at 21 40 19 Screenshot 2026-02-19 at 21 42 43 Screenshot 2026-02-19 at 21 40 41 Screenshot 2026-02-19 at 21 40 46

🔄 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/keycastr/keycastr/pull/339 **Author:** [@nikborovets](https://github.com/nikborovets) **Created:** 2/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `win-equivalent` --- ### 📝 Commits (4) - [`9e760bf`](https://github.com/keycastr/keycastr/commit/9e760bf123e974332fcbd74cadc51daf6d659953) Add Windows keystroke transformation support - [`b9ef958`](https://github.com/keycastr/keycastr/commit/b9ef9587755eaae9c4f48cede5a6a5c9ecb0d3cc) Add option to show Windows equivalent keystrokes in visualizers - [`d6e2755`](https://github.com/keycastr/keycastr/commit/d6e27550d25cc4add7bec6dd9e9dbb6aab12a17e) Disable Windows equivalent keystrokes display in KCDefaultVisualizer and SvelteVisualizer - [`cce31c2`](https://github.com/keycastr/keycastr/commit/cce31c22cfbe7d821b364732539651f14e45b214) Refine Windows keystroke display logic in KCEventTransformer ### 📊 Changes **9 files changed** (+143 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `keycastr/KCDefaultVisualizer.m` (+14 -1) 📝 `keycastr/KCDefaultVisualizer.nib/designable.nib` (+32 -19) 📝 `keycastr/KCDefaultVisualizer.nib/keyedobjects.nib` (+0 -0) 📝 `keycastr/KCEventTransformer.h` (+2 -0) 📝 `keycastr/KCEventTransformer.m` (+43 -0) 📝 `keycastr/Svelte.nib/designable.nib` (+19 -6) 📝 `keycastr/Svelte.nib/keyedobjects.nib` (+0 -0) 📝 `keycastr/SvelteVisualizer.h` (+2 -0) 📝 `keycastr/SvelteVisualizer.m` (+31 -11) </details> ### 📄 Description Enhance KCEventTransformer to include a method for transforming keystrokes to their Windows equivalents. Update KCDefaultVisualizer to display both macOS and Windows keystroke representations when applicable. --- This pull request enhances the keystroke visualization by displaying both macOS and Windows-style shortcut representations when appropriate. The main focus is on providing users with an immediate reference for cross-platform keyboard shortcuts, particularly when modifier keys are involved. **Cross-platform shortcut display improvements:** * Added logic in `KCDefaultVisualizer.m` to display both the macOS and Windows-style shortcut strings side-by-side when a keystroke includes Command, Control, or Option modifiers, helping users see equivalent shortcuts at a glance. * Introduced a new method `transformedValueForWindows:` in `KCEventTransformer` to generate Windows-style shortcut strings based on the keystroke's modifier flags and key code. [[1]](diffhunk://#diff-864ea2e8acf482618b7269892d82caa8b59269bef5ca3bf8c5c8aee5814970f1R44-R45) [[2]](diffhunk://#diff-a12ea3663ad7bc620984e233857bce3f191f78810b76c44cde980651c79b91cbR325-R373) * Updated imports in `KCDefaultVisualizer.m` to include the new `KCEventTransformer` dependency. <img width="438" height="115" alt="Screenshot 2026-02-19 at 21 39 24" src="https://github.com/user-attachments/assets/9cb302c5-e1c8-4b98-80d0-2206f77c7428" /> <img width="946" height="115" alt="Screenshot 2026-02-19 at 21 40 19" src="https://github.com/user-attachments/assets/b72a9399-31bf-4a66-b6f7-539def41b305" /> <img width="200" height="100" alt="Screenshot 2026-02-19 at 21 42 43" src="https://github.com/user-attachments/assets/f4f5def7-468e-48e4-b577-2529f9e3416c" /> <img width="505" height="729" alt="Screenshot 2026-02-19 at 21 40 41" src="https://github.com/user-attachments/assets/3954f4f4-1fea-44b3-8060-e08da3cb968a" /> <img width="505" height="410" alt="Screenshot 2026-02-19 at 21 40 46" src="https://github.com/user-attachments/assets/86b309f4-26d0-461f-8389-3562ed5fedfd" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror added the
pull-request
label 2026-05-05 05:13:36 -06: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: github-starred/keycastr#338
No description provided.