Skip to content

fix: enhance foreign keyboard layout and key mapping#175

Merged
conventoangelo merged 3 commits intomainfrom
fix/range-error
Feb 27, 2026
Merged

fix: enhance foreign keyboard layout and key mapping#175
conventoangelo merged 3 commits intomainfrom
fix/range-error

Conversation

@conventoangelo
Copy link
Owner

@conventoangelo conventoangelo commented Feb 27, 2026

Summary by CodeRabbit

  • New Features
    • Added a new QWERTY (Foreign) keyboard layout option for users.
    • Improved handling of foreign keyboard layouts with enhanced fallback behavior when keys are unavailable.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Warning

Rate limit exceeded

@conventoangelo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 55 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 4ff5fca and 8de432b.

📒 Files selected for processing (2)
  • lib/models/keyboard_layouts.dart
  • lib/screens/keyboard_screen.dart
📝 Walkthrough

Walkthrough

A new QWERTY (Foreign) keyboard layout constant was added to the keyboard layouts model, and the keyboard screen was updated to perform bounds-checked lookups into this layout when handling foreign keyboard inputs, with fallback to the original key for out-of-range indices.

Changes

Cohort / File(s) Summary
Keyboard Layout Definition
lib/models/keyboard_layouts.dart
Added a new public qwertyForeign constant containing a complete QWERTY foreign keyboard layout with a full key matrix including a space row. The layout was declared but not integrated into the availableLayouts list.
Keyboard Input Handling
lib/screens/keyboard_screen.dart
Replaced unconditional key mapping logic for foreign layouts with bounds-checked lookup into qwertyForeign. The logic now attempts to use the mapped key from the foreign layout if the indices are valid; otherwise, it falls back to the original key.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A foreign key arrives today,
In QWERTY's bounds-checked way!
No gaps remain, no crashes dwell,
With fallback logic cast as spell ✨
Our keyboard hops through layouts well!

🚥 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 clearly describes the main changes: adding a new foreign keyboard layout and improving key mapping logic with bounds checking.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/range-error

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.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@conventoangelo conventoangelo merged commit 902bf48 into main Feb 27, 2026
5 checks passed
@conventoangelo conventoangelo deleted the fix/range-error branch February 27, 2026 17:17
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.

2 participants