[PR #333] [CLOSED] Add dual notation feature (macOS + Windows) for keystroke display #337

Closed
opened 2026-05-05 05:13:35 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/keycastr/keycastr/pull/333
Author: @shin902
Created: 11/15/2025
Status: Closed

Base: mainHead: claude/dual-shortcut-display-01WUfj42NnNhn3gBfGa25e3t


📝 Commits (2)

  • 60070c7 Add dual notation feature (macOS + Windows) for keystroke display
  • 5264fb8 Refactor: Improve code quality and fix critical issues

📊 Changes

5 files changed (+263 additions, -5 deletions)

View changed files

📝 keycastr/KCDefaultVisualizer.h (+1 -0)
📝 keycastr/KCDefaultVisualizer.m (+47 -2)
📝 keycastr/KCEventTransformer.h (+1 -0)
📝 keycastr/KCEventTransformer.m (+170 -3)
📝 keycastr/KCVisualizerTests/KCKeystrokeConversionTests.m (+44 -0)

📄 Description

Implements a new feature to display pressed shortcuts in both macOS and Windows notation simultaneously. When enabled, keystrokes are shown side-by-side (e.g., "⌘C │ Ctrl+C").

Changes:

  • Add transformedValueToWindowsNotation: method to KCEventTransformer

    • Converts macOS modifier symbols to Windows text format
    • Maps ⌘/⌃ → Ctrl, ⌥ → Alt, ⇧ → Shift
    • Converts special keys (arrows, F-keys, etc.) to Windows equivalents
  • Extend KCDefaultVisualizer to support dual notation display

    • Add default.showDualNotation UserDefaults key (default: NO)
    • Modify addKeystroke: to generate both notations when enabled
    • Display format: "macOS notation │ Windows notation"
  • Add preferences UI checkbox programmatically

    • KCDefaultVisualizerPreferencesView creates checkbox in awakeFromNib
    • Checkbox bound to UserDefaults for automatic persistence
  • Add comprehensive unit tests

    • Test Windows notation conversion for various shortcuts
    • Verify correct modifier mapping and special key handling

The feature is disabled by default for backward compatibility.


🔄 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/333 **Author:** [@shin902](https://github.com/shin902) **Created:** 11/15/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `claude/dual-shortcut-display-01WUfj42NnNhn3gBfGa25e3t` --- ### 📝 Commits (2) - [`60070c7`](https://github.com/keycastr/keycastr/commit/60070c788331952e1796699ccf8d3956aa1eec27) Add dual notation feature (macOS + Windows) for keystroke display - [`5264fb8`](https://github.com/keycastr/keycastr/commit/5264fb86682dd36fb7b71f34790484b43b6895e6) Refactor: Improve code quality and fix critical issues ### 📊 Changes **5 files changed** (+263 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `keycastr/KCDefaultVisualizer.h` (+1 -0) 📝 `keycastr/KCDefaultVisualizer.m` (+47 -2) 📝 `keycastr/KCEventTransformer.h` (+1 -0) 📝 `keycastr/KCEventTransformer.m` (+170 -3) 📝 `keycastr/KCVisualizerTests/KCKeystrokeConversionTests.m` (+44 -0) </details> ### 📄 Description Implements a new feature to display pressed shortcuts in both macOS and Windows notation simultaneously. When enabled, keystrokes are shown side-by-side (e.g., "⌘C │ Ctrl+C"). Changes: - Add transformedValueToWindowsNotation: method to KCEventTransformer - Converts macOS modifier symbols to Windows text format - Maps ⌘/⌃ → Ctrl, ⌥ → Alt, ⇧ → Shift - Converts special keys (arrows, F-keys, etc.) to Windows equivalents - Extend KCDefaultVisualizer to support dual notation display - Add default.showDualNotation UserDefaults key (default: NO) - Modify addKeystroke: to generate both notations when enabled - Display format: "macOS notation │ Windows notation" - Add preferences UI checkbox programmatically - KCDefaultVisualizerPreferencesView creates checkbox in awakeFromNib - Checkbox bound to UserDefaults for automatic persistence - Add comprehensive unit tests - Test Windows notation conversion for various shortcuts - Verify correct modifier mapping and special key handling The feature is disabled by default for backward compatibility. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 05:13:35 -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#337
No description provided.