Skip to content
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

move setInputCapture to mainGrid, except ctrl+c #135

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

stijnveenman
Copy link
Contributor

Currently, when you open the find Dialog, pressing escape to close it does not work. First.
First, i tried checking if a DialogPage existed, and if it does, close it. I added this in the ActionLogFindExit, but this closing of the dialog page is not always connected to Esc is the keybinding is changed. So it needed an extra check for that. This didn't feel right to me.

Thinking about it, it felt odd the escape never reached the PageDialog even though that page has focus. It seems that's because all the keybindings are captures in the appView. This always goes first, before any active page.

So I moved this mapping to the mainGrid page. This caused Control+C to not be captures. So i moved just this keybinding so the appView.

This allows the PageDialog to handle Escape before it's send to the mainGrid. Which allows the search dialog to close itself on escape.

I tried to make sure all keybindings still work, and as far as i can tell they do.

Copy link

sonarqubecloud bot commented Feb 4, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Owner

@F1bonacc1 F1bonacc1 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. Thanks!

@F1bonacc1 F1bonacc1 merged commit f07cfdf into F1bonacc1:main Feb 4, 2024
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.

2 participants