rio icon indicating copy to clipboard operation
rio copied to clipboard

Some keys require a "None" binding to work properly as key bindings

Open dougaak opened this issue 1 year ago • 3 comments

Rio version: v0.2.30 OS: Windows 11

I discovered that pageup, pagedown and alt+return all need a "None" action binded before they can be used for other actions.

# This doesn't work
{ key = 'pageup', action = 'Scroll(1)'},
{ key = 'pagedown', action = 'Scroll(-1)'},
# This works
{ key = 'pageup', action = 'None'},
{ key = 'pagedown', action = 'None'},
{ key = 'pageup', action = 'Scroll(1)'},
{ key = 'pagedown', action = 'Scroll(-1)'},

For pageup, without "None" beforehand, it seems to be able to trigger the action for once, but then it's not responding, as for pagedown, it's just not responding.

And alt+return may be an insightful one, as I later know that it is a popular default hotkey in Windows for toggling fullscreen. And it is true that even without bindings, alt+return will toggle fullscreen. Adding a "None" before hand can set alt+return back to a clean state and use it for something else.

So this makes me suspect that some keys actually have some internal bindings for the window, and without the "None" to clear it, both bindings will be triggered at the same time and cause weird behaviors.

dougaak avatar Sep 21 '25 13:09 dougaak

Hey @Dougaak thanks for the issue!

could you test with 80930c5826 ?

raphamorim avatar Sep 21 '25 16:09 raphamorim

Tested the v0.2.31, the issue is fixed now, thanks!

dougaak avatar Sep 27 '25 05:09 dougaak

thank you!

raphamorim avatar Sep 27 '25 08:09 raphamorim