Skip to content

fix(windows): Fix windows modifier key mappings#64

Merged
gdamore merged 3 commits intomainfrom
fix-win-modifiers
Jan 11, 2026
Merged

fix(windows): Fix windows modifier key mappings#64
gdamore merged 3 commits intomainfrom
fix-win-modifiers

Conversation

@gdamore
Copy link
Owner

@gdamore gdamore commented Jan 11, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved Windows keyboard input handling for more reliable modifier and Windows-key detection.
  • Chores

    • Internal memory-safety annotation adjusted to support safe module initialization across more contexts.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 11, 2026

Warning

Rate limit exceeded

@gdamore has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 90a51e5 and 580a05c.

📒 Files selected for processing (2)
  • source/dcell/color.d
  • source/dcell/parser.d
📝 Walkthrough

Walkthrough

Updated Windows key mappings and lone-modifier detection in the parser; changed the Color module's shared static constructor annotation from @safe to @trusted.

Changes

Cohort / File(s) Summary
Windows key mapping & handling
source/dcell/parser.d
Remapped key code 0x0c to Key.clear and removed the prior 0x12Key.clear mapping. Broadened lone-modifier detection in handleWinKey to consider 0x10, 0x11, 0x12, and 0x14.
Color module safety annotation
source/dcell/color.d
Changed shared static this() annotation from @safe to @trusted without altering behavior or signature.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through code with a twitching nose,
Mapped a key where the wild wind blows,
Trusted my constructor, snug and bright,
Modifiers lined up, all proper and right,
A tiny rabbit cheers — code done, delight! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(windows): Fix windows modifier key mappings' accurately describes the main change, which involves fixing Windows key mappings in the parser module.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 90a51e5 and 2999f98.

📒 Files selected for processing (1)
  • source/dcell/parser.d
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-15T05:12:35.344Z
Learnt from: gdamore
Repo: gdamore/dcell PR: 56
File: source/dcell/vt.d:2-2
Timestamp: 2025-12-15T05:12:35.344Z
Learning: In D (as used in gdamore/dcell), an enum-type variable like Attr attr can be referred to in case statements using either attr.EnumMember or Attr.EnumMember due to aliasing. For consistency and readability, prefer using the type name (Attr.EnumMember) in case statements instead of the lowercase variable name (attr.EnumMember). This guideline applies to D files across the repository (source/**/*.d or any .d files).

Applied to files:

  • source/dcell/parser.d
🔇 Additional comments (1)
source/dcell/parser.d (1)

268-268: LGTM: Correct mapping for VK_CLEAR.

The addition of 0x0c (VK_CLEAR) mapped to Key.clear is correct according to Windows virtual key code specifications.

@gdamore
Copy link
Owner Author

gdamore commented Jan 11, 2026

@CodeRabbit full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 11, 2026

✅ Actions performed

Full review triggered.

@gdamore gdamore merged commit 580a05c into main Jan 11, 2026
5 checks passed
@gdamore gdamore deleted the fix-win-modifiers branch January 11, 2026 03:37
@codecov
Copy link

codecov bot commented Jan 11, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

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.

1 participant