Skip to content

Put alt handling code in FormBase. Fixes #3584. #4380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SuuperW
Copy link
Contributor

@SuuperW SuuperW commented Jun 28, 2025

This also allows for the use of alt keys to use the menu items in Virtual Pad. Although for some reason I can't figure out, pressing alt does not underline the relevant letters in the tool bar like it does for other windows.

Note: If a hotkey is set to a key combination that normally would open a menu (e.g. Alt+F, which normally opens the File menu) then the hotkey is triggered and the menu is not opened. This is the same as prior behavior in MainForm, just now applied to tools as well.

Check if completed:

@SuuperW SuuperW requested a review from YoshiRulz July 10, 2025 00:48
Copy link
Member

@YoshiRulz YoshiRulz left a comment

Choose a reason for hiding this comment

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

I can't really review this since I don't use Windows.


// Alt key hacks. We need this in order for hotkey bindings with alt to work.
/// <summary>sends a simulation of a plain alt key keystroke</summary>
internal void SendPlainAltKey(int lparam)
Copy link
Member

Choose a reason for hiding this comment

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

These should be public.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why should they be more visible than they need to be?

Copy link
Member

@YoshiRulz YoshiRulz Jul 10, 2025

Choose a reason for hiding this comment

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

FormBase and the caller, Input, aren't semantically related. I misread the diff viewer. My point still stands: They may end up in separate projects in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The caller is MainForm.

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