Skip to content

test: add missing linux and extra modifier tests#944

Merged
gdamore merged 1 commit into
mainfrom
more-key-tests
Dec 30, 2025
Merged

test: add missing linux and extra modifier tests#944
gdamore merged 1 commit into
mainfrom
more-key-tests

Conversation

@gdamore

@gdamore gdamore commented Dec 30, 2025

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Tests
    • Expanded test coverage for keyboard input handling, including additional modifier combinations (Alt, Hyper, Super) and Linux console special key sequences for function keys.

Note: No user-facing changes in this release.

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

@coderabbitai

coderabbitai Bot commented Dec 30, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR expands test coverage in TestSpecialKeys by adding test cases for CSI-F2 modifier variants (Alt, Hyper, Super), ESC-Tab Linux console sequence, and Linux F1–F5 function key mappings. No production code changes.

Changes

Cohort / File(s) Summary
Test Coverage Enhancement
input_test.go
Adds test cases for CSI-F2 variants with modifiers (Alt, Hyper, Super), ESC-Tab Linux sequence, and Linux F1–F5 function key mappings to TestSpecialKeys

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 Hop, hop, hooray! Keys are tested, one by one,
F2 with Alt, Hyper, Super—oh what fun!
Linux sequences, ESC-Tab so fine,
Test cases growing, coverage divine! ✨

Pre-merge checks and finishing touches

✅ 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 accurately describes the main change: adding test cases for Linux-style key sequences and additional modifier combinations (CSI-F2 variants with Alt/Hyper/Super, ESC-Tab, Linux-F1-F5).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 068cd82 and 44224cf.

📒 Files selected for processing (1)
  • input_test.go
🧰 Additional context used
🧬 Code graph analysis (1)
input_test.go (1)
key.go (7)
  • KeyF2 (360-360)
  • KeyHome (348-348)
  • KeyBacktab (358-358)
  • KeyF1 (359-359)
  • KeyF3 (361-361)
  • KeyF4 (362-362)
  • KeyF5 (363-363)
🔇 Additional comments (3)
input_test.go (3)

577-577: LGTM!

The ESC-Tab test case correctly covers the Linux console convention where ESC followed by Tab maps to Backtab.


578-582: LGTM!

The Linux F1-F5 test cases correctly cover the Linux console escape sequences (ESC [ [ followed by A-E) mapping to function keys F1 through F5 without modifiers.


573-575: No action needed—this test case is correct.

The test name "CSI-F2-Super" correctly identifies the input modifier (Super from the terminal sequence), and the expected result ModMeta is intentional. The implementation explicitly maps Super to ModMeta with the comment "for now not separating from Super" (line 663 in input.go). This is documented behavior, not an inconsistency.

Likely an incorrect or invalid review comment.


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

codecov Bot commented Dec 30, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.64%. Comparing base (068cd82) to head (44224cf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #944      +/-   ##
==========================================
+ Coverage   61.00%   61.64%   +0.63%     
==========================================
  Files          37       37              
  Lines        3293     3293              
==========================================
+ Hits         2009     2030      +21     
+ Misses       1125     1107      -18     
+ Partials      159      156       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gdamore gdamore merged commit 44224cf into main Dec 30, 2025
15 checks passed
@gdamore gdamore deleted the more-key-tests branch December 30, 2025 01:47
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