Skip to content

Enable AltGr in wxTerminal.#218

Merged
jrincayc merged 2 commits intojrincayc:masterfrom
1bildung:master
Apr 28, 2025
Merged

Enable AltGr in wxTerminal.#218
jrincayc merged 2 commits intojrincayc:masterfrom
1bildung:master

Conversation

@1bildung
Copy link
Contributor

@1bildung 1bildung commented Apr 2, 2025

Fix issue #216

wxTerminal.cpp Outdated
//If the key event has control or alt pressed, let something else handle it
//If the key event has control or alt pressed, let something else handle it
int modCode = (int) event.GetModifiers();
if((modCode == wxMOD_ALT) || (modCode == wxMOD_CONTROL)) {
Copy link
Owner

@jrincayc jrincayc Apr 20, 2025

Choose a reason for hiding this comment

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

Hm, we use shift with some control functions, so should this be:
if((modCode == wxMOD_ALT) || (modCode == wxMOD_CONTROL) || (modCode == (wxMOD_CONTROL | wxMOD_SHIFT)))

Copy link
Owner

@jrincayc jrincayc Apr 20, 2025

Choose a reason for hiding this comment

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

Or another possibility (that I have not tested) is to filter out wxMOD_ALTGR :
if(event.HasModifiers() && event.getModifiers() != wxMOD_ALTGR)

Copy link
Owner

Choose a reason for hiding this comment

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

Basically, the submitted pull request breaks Ctrl++ since that needs shift and control, so please fix, and then I can merge this. Thanks.

Copy link
Owner

Choose a reason for hiding this comment

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

Fixed myself.

Copy link
Owner

@jrincayc jrincayc left a comment

Choose a reason for hiding this comment

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

Reviewed and approve.

@jrincayc jrincayc merged commit 2d4140c into jrincayc:master Apr 28, 2025
1 check 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.

2 participants