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

Custom keyboard shortcuts don't override default behavior #12164

Closed
BeayemX opened this issue Oct 16, 2017 · 4 comments · Fixed by #43663 or #44181
Closed

Custom keyboard shortcuts don't override default behavior #12164

BeayemX opened this issue Oct 16, 2017 · 4 comments · Fixed by #43663 or #44181

Comments

@BeayemX
Copy link
Contributor

BeayemX commented Oct 16, 2017

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Godot 2.1.4
Godot 3.0 (built from master)

Issue description:
When using custom shortcuts, default behavior is executed before shortcut-behavior is executed.

Steps to reproduce:
Override keyboard shortcuts for 'Script Editor / Next Script' with Ctrl+PageDown
Override keyboard shortcuts for 'Script Editor / Previous Script' with Ctrl+PageUp

Use shortcuts in script editor.
When pressing Ctrl+PageUp see that cursor jumps to the first line of the file before going to previous script.
When pressing Ctrl+PageDown see that cursor jumps to the last line of the file before going to next script.

@akien-mga
Copy link
Member

Is this still reproducible in Godot 3.0 RC1?

Also, aren't the "default behaviors" also defined in the editor shortcuts? If so you might need to undefine them if you want to override them.

@BeayemX
Copy link
Contributor Author

BeayemX commented Jan 15, 2018

The bug is still there but the behavior changed slightly.
When trying to use Control+PageDown for Script Editor/History Next and Control+PageUp for Script Editor/History Prev the cursor just jumps around like Control is not pressed and History Next and History Prev are not executed at all.

The "default behavior" in this case for PageUp and PageDown is just to scroll by one page. Maybe this is handled differently than other shortcuts?

Edit:
No matter the shortcut, nothing works with PageUp and PageDown

Edit2:
Home and End can't be used either within a shortcut

@ShawnMcCool
Copy link

So yeah, I have changed the default "QWER" shortcut functionality in the spacial editor and the changes have zero effect.

@KoBeWi
Copy link
Member

KoBeWi commented Jun 13, 2020

Soo, some keys do have default behavior, like mentioned PageUp. While it doesn't make sense to have shortcuts that override e.g. End or Home, there are some key combinations that are not used, e.g. Control + PageUp or Alt + End. Right now it's impossible to use them as shortcuts, because Alt + End acts as End etc. This could be easily fixed by ignoring certain non-shortcut key combinations in TextEdit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment