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

Auto-Type: PageUp/PageDown scrolling for entries #6364

Merged

Conversation

hifi
Copy link
Member

@hifi hifi commented Apr 3, 2021

The original issue was likely related to subtle keyboard focus issues in the old dialog but since we explicitly focus in the new input field we can capture these keys in addition to arrows to emulate paging consistently on all platforms. We can't capture Home/End keys because it would conflict with line editing.

Number 5 was chosen by fair dice roll.

Fixes #4530

Testing strategy

Manually on Linux.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@hifi hifi added this to the v2.7.0 milestone Apr 3, 2021
@droidmonkey
Copy link
Member

droidmonkey commented Apr 3, 2021

I feel like this code could be as simple as:

newpos = qbound(0, list.current + offset, list.itemcount)
list.setcurrent(newpos)

@hifi hifi force-pushed the fix/autotype-dialog-paging branch from 25d456f to af7353c Compare April 3, 2021 19:44
@hifi
Copy link
Member Author

hifi commented Apr 3, 2021

Indeed, it was completely unnecessary to do it with a loop when we know the bounds.

Now with net code reduction of 6 lines 🎉

@hifi hifi force-pushed the fix/autotype-dialog-paging branch from af7353c to 1b446bc Compare April 4, 2021 05:35
@droidmonkey droidmonkey force-pushed the fix/autotype-dialog-paging branch from 13c8039 to 3f00d15 Compare April 6, 2021 02:58
@droidmonkey droidmonkey merged commit 31aa5e1 into keepassxreboot:develop Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Page Up / Down and Home / End keys in Auto-Type entry selector
2 participants