Skip to content

Add ALT + ENTER control action#1498

Merged
utkarshdalal merged 1 commit into
utkarshdalal:masterfrom
Nightwalker743:feature/alt-enter-control-action
Jun 2, 2026
Merged

Add ALT + ENTER control action#1498
utkarshdalal merged 1 commit into
utkarshdalal:masterfrom
Nightwalker743:feature/alt-enter-control-action

Conversation

@Nightwalker743
Copy link
Copy Markdown
Contributor

@Nightwalker743 Nightwalker743 commented May 31, 2026

Description

This is a requested feature from here: https://discord.com/channels/1378308569287622737/1510095216009543681

Adds a new control action for ALT + ENTER.

Recording

Screen_Recording_20260531_161927_GameNative.mp4

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Adds an ALT_ENTER binding under Extras that presses Left Alt + Enter on down and releases both on up. This enables a single control to trigger Alt+Enter (commonly used for fullscreen) in apps.

Written for commit 1991d01. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • ALT+ENTER keyboard shortcut is now available as a configurable control binding with proper simultaneous Alt and Enter key handling for input controls

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 745a2e72-b549-47e6-9e41-6673ad606703

📥 Commits

Reviewing files that changed from the base of the PR and between 2bea2aa and 1991d01.

📒 Files selected for processing (2)
  • app/src/main/java/com/winlator/inputcontrols/Binding.java
  • app/src/main/java/com/winlator/widget/InputControlsView.java

📝 Walkthrough

Walkthrough

This PR adds support for the ALT+ENTER key binding in the input control system. The Binding enum gains a new ALT_ENTER constant that is formatted as "ALT + ENTER" and classified as an extra binding. The input event handler explicitly implements the key press/release sequence for this binding via xServer.

Changes

ALT + ENTER Input Binding

Layer / File(s) Summary
Binding enum definition and formatting
app/src/main/java/com/winlator/inputcontrols/Binding.java
ALT_ENTER enum constant added and integrated into toString() to return "ALT + ENTER" and isExtra() to classify it as an extra binding.
Input event handling for ALT_ENTER
app/src/main/java/com/winlator/widget/InputControlsView.java
handleInputEvent() method extended to intercept ALT_ENTER binding and inject the Alt-left and Enter key press/release sequence through xServer.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops with ALT and ENTER key,
Two keys combined in perfect harmony!
🐰✨ Fullscreen dreams come alive today,
New bindings brighten up the gamer's way!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and directly summarizes the main change: adding a new ALT + ENTER control action to the codebase.
Description check ✅ Passed The description follows the template structure with all required sections completed: description, recording, type of change, and a fully checked checklist.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Nightwalker743 Nightwalker743 marked this pull request as ready for review May 31, 2026 21:32
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

Copy link
Copy Markdown
Contributor

@phobos665 phobos665 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Are there any other potential combinations we may want?

@Nightwalker743
Copy link
Copy Markdown
Contributor Author

Looks good to me.

Are there any other potential combinations we may want?

Thanks! There aren't any other combinations that I can think of that would be useful here. But we are missing END, INSERT, = and `/~ keys from the action list too. Should I go ahead and add those as well? Tilde is often used as the developer console for valve games.

@utkarshdalal utkarshdalal merged commit ee021e7 into utkarshdalal:master Jun 2, 2026
3 checks passed
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.

3 participants