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

CTRL + SHIFT + UP/DOWN remapping not working in Script Text Editor #26854

Closed
rogeriodec opened this issue Mar 9, 2019 · 4 comments · Fixed by #43663
Closed

CTRL + SHIFT + UP/DOWN remapping not working in Script Text Editor #26854

rogeriodec opened this issue Mar 9, 2019 · 4 comments · Fixed by #43663

Comments

@rogeriodec
Copy link

Godot version:
3.1 RC1

OS/device including version:
Windows 10 x64

Issue description:
I tried to remap the keyboard shortcuts "Move Up" and "Move Down" to become similar to the "Sublime Text" editor, which would respectively be Ctrl+Shift+Up and Ctrl+Shift+Down, but these combinations are not working.

Steps to reproduce:

Editor -> Editor Setting -> Shortcuts

@Chaosus Chaosus changed the title Some Shortcuts remapping doesn't work "Move Up" and "Move Down" editor shortcuts cannot be remapped Mar 10, 2019
@KoBeWi
Copy link
Member

KoBeWi commented Mar 11, 2019

Move up/down CAN be remapped. Script editor just doesn't take any shortcuts that use combinations of CTRL/SHIFT and arrows. But combination CTRL + SHIFT + UP/DOWN doesn't seem to do anything normally.

@rogeriodec rogeriodec changed the title "Move Up" and "Move Down" editor shortcuts cannot be remapped CTRL + SHIFT + UP/DOWN remapping not working Mar 12, 2019
@akien-mga akien-mga changed the title CTRL + SHIFT + UP/DOWN remapping not working CTRL + SHIFT + UP/DOWN remapping not working in Script Text Editor Jun 24, 2020
@akien-mga
Copy link
Member

akien-mga commented Jun 24, 2020

Confirmed in 3.2.2 RC 3 in the script text editor.

Ctrl+Up/Ctrl+Down seem to be hardcoded to scroll the active script up/down by one line, which likely conflicts with using Shift+Ctrl+Up for other actions (here "Move Up" rebound to Shift+Ctrl+Up has this same scroll-one-line behavior).

CC @Paulb23

@akien-mga
Copy link
Member

It's probably because TextEdit handles this directly, so combinations with Up/Down and Ctrl (Cmd+Alt on macOS) don't work:

godot/scene/gui/text_edit.cpp

Lines 3211 to 3223 in 3c9fc89

case KEY_UP: {
if (k->get_alt()) {
keycode_handled = false;
break;
}
#ifndef APPLE_STYLE_KEYS
if (k->get_command()) {
#else
if (k->get_command() && k->get_alt()) {
#endif
_scroll_lines_up();
break;
}

@Paulb23
Copy link
Member

Paulb23 commented Jun 26, 2020

Yeah looks like another case of #29490

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