Skip to content

fix(config): the built-in F1-F12 key symbols never match - #66

Merged
844196 merged 1 commit into
mainfrom
844196/main/fix-65
Sep 3, 2026
Merged

fix(config): the built-in F1-F12 key symbols never match#66
844196 merged 1 commit into
mainfrom
844196/main/fix-65

Conversation

@844196

@844196 844196 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

@cliffy/keycode reports function keys as lower-case f1-f12, but
DEFAULT_KEY_SYMBOLS in src/schema.ts spelled them upper-case
F1-F12. getKeySymbol looked up the reported key name directly, so
the lookup always missed and fell back to rendering the raw key name
(f1) instead of the Nerd Font glyph.

Fixes #65.

@844196
844196 requested a balanced review from Copilot September 3, 2026 14:00
@844196 844196 self-assigned this Sep 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The fallback incorrectly makes symbol lookup case-insensitive, and the regression lacks test coverage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Fixes function-key glyph rendering by aligning built-in symbols with Cliffy’s lowercase key names.

Changes:

  • Renames F1–F12 symbol keys to lowercase.
  • Adds a lowercase fallback during symbol lookup.
File summaries
File Description
src/schema.ts Corrects built-in function-key names.
src/ui.ts Adds lowercase symbol lookup fallback.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/schema.ts
Comment thread src/ui.ts Outdated
…-case names

@cliffy/keycode reports function keys as "f1"-"f12", but
DEFAULT_KEY_SYMBOLS spelled them "F1"-"F12", so the lookup in
getKeySymbol always missed and fell back to the raw key name.

Renamed the twelve entries to lower case to match, and added an e2e
regression test asserting a lowercase-keyed binding (e.g. `key: f1`)
renders its built-in glyph, so a reintroduced casing mismatch fails
the suite instead of only being caught by eye.

Closes #65

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused mapping correction is consistent with existing lookup behavior and includes appropriate regression coverage.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@844196
844196 merged commit 913c3c0 into main Sep 3, 2026
4 checks passed
@844196
844196 deleted the 844196/main/fix-65 branch September 3, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(config): the built-in F1-F12 key symbols never match

2 participants