[PR #352] Add a configurable visible keystroke limit #353

Open
opened 2026-10-02 23:09:25 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/keycastr/keycastr/pull/352
Author: @AbdelrahmanHafez
Created: 8/10/2026
Status: 🔄 Open

Base: main ← Head: feat/max-visible-keystrokes


📝 Commits (6)

  • 12e6d5a test(visualizers): cover visible keystroke limits
  • 735978e feat(visualizers): configure visible keystroke limits
  • 10dae26 test(visualizers): cover review edge cases
  • 7078f3d fix(visualizers): handle limit edge cases
  • 9298ca5 test(default): preserve exempt rows when trimming
  • 3993c92 fix(default): retain exempt rows while trimming

📊 Changes

10 files changed (+747 additions, -67 deletions)

View changed files

📝 keycastr/KCDefaultVisualizer.h (+15 -2)
📝 keycastr/KCDefaultVisualizer.m (+169 -27)
📝 keycastr/KCDefaultVisualizer.nib/designable.nib (+45 -1)
📝 keycastr/KCDefaultVisualizer.nib/keyedobjects.nib (+0 -0)
➕ keycastr/KCVisualizerTests/KCVisibleKeystrokeLimitTests.m (+354 -0)
📝 keycastr/KeyCastr.xcodeproj/project.pbxproj (+4 -0)
📝 keycastr/Svelte.nib/designable.nib (+42 -2)
📝 keycastr/Svelte.nib/keyedobjects.nib (+0 -0)
📝 keycastr/SvelteVisualizer.h (+7 -0)
📝 keycastr/SvelteVisualizer.m (+111 -35)

📄 Description

This adds a maximum visible keystrokes setting to both the Svelte and Default visualizers.

The limit counts key events rather than string length, so labels such as ⌘B and ⊞1 count as one keystroke. Mouse events can still be displayed without consuming a slot. A value of 0 means unlimited.

Existing behavior stays unchanged by default. Svelte keeps six visible keystrokes, while Default remains unlimited. Default applies the cap across all visible rows, and changing the setting trims the current display immediately.

The preference is available in both visualizer panes.


🔄 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/352 **Author:** [@AbdelrahmanHafez](https://github.com/AbdelrahmanHafez) **Created:** 8/10/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/max-visible-keystrokes` --- ### 📝 Commits (6) - [`12e6d5a`](https://github.com/keycastr/keycastr/commit/12e6d5a5db2db6690b16345ca6eb2ff405a53245) test(visualizers): cover visible keystroke limits - [`735978e`](https://github.com/keycastr/keycastr/commit/735978eb513bf76be8b4ac1b019662771fa4cc0d) feat(visualizers): configure visible keystroke limits - [`10dae26`](https://github.com/keycastr/keycastr/commit/10dae26e4d8837d6cda607e337466dfefcb3a78f) test(visualizers): cover review edge cases - [`7078f3d`](https://github.com/keycastr/keycastr/commit/7078f3d5b4c4ca5b8e551a550cacc683c240089a) fix(visualizers): handle limit edge cases - [`9298ca5`](https://github.com/keycastr/keycastr/commit/9298ca5a81c3f495b079a7bb3d42e91ce4ee4ff3) test(default): preserve exempt rows when trimming - [`3993c92`](https://github.com/keycastr/keycastr/commit/3993c923e3b42e1cfdf281806fe05b42b8799d54) fix(default): retain exempt rows while trimming ### 📊 Changes **10 files changed** (+747 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `keycastr/KCDefaultVisualizer.h` (+15 -2) 📝 `keycastr/KCDefaultVisualizer.m` (+169 -27) 📝 `keycastr/KCDefaultVisualizer.nib/designable.nib` (+45 -1) 📝 `keycastr/KCDefaultVisualizer.nib/keyedobjects.nib` (+0 -0) ➕ `keycastr/KCVisualizerTests/KCVisibleKeystrokeLimitTests.m` (+354 -0) 📝 `keycastr/KeyCastr.xcodeproj/project.pbxproj` (+4 -0) 📝 `keycastr/Svelte.nib/designable.nib` (+42 -2) 📝 `keycastr/Svelte.nib/keyedobjects.nib` (+0 -0) 📝 `keycastr/SvelteVisualizer.h` (+7 -0) 📝 `keycastr/SvelteVisualizer.m` (+111 -35) </details> ### 📄 Description This adds a maximum visible keystrokes setting to both the Svelte and Default visualizers. The limit counts key events rather than string length, so labels such as `⌘B` and `⊞1` count as one keystroke. Mouse events can still be displayed without consuming a slot. A value of `0` means unlimited. Existing behavior stays unchanged by default. Svelte keeps six visible keystrokes, while Default remains unlimited. Default applies the cap across all visible rows, and changing the setting trims the current display immediately. The preference is available in both visualizer panes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#353
No description provided.