Godot version:
Godot 3.1 beta3, and beta2
OS/device including version:
Windows 7 (EDIT: i forgot to add that I'm using and American International layout for my keyboard)
Issue description:
When i try to write in a script a quotation mark, the cursor jumps down to the bottom of the page, selecting everything in between
Steps to reproduce:
Write a quotation mark at the top of a script
Minimal reproduction project:
It works for every script
It seems non-reproducible in Ubuntu 18.04.1 LTS
It's seems non reproducible in Ubuntu 18.04.1 LTS
Yeah, it didn't work on mine either
This could be related to the keyboard layout you're using on Windows. Does it happen if you use something like QWERTY instead?
Can't reproduce this on Windows 10 - 3.1 Beta 3 - QWERTY
I forgot to add it, i'm using an American layout for my keyboard
Can't reproduce this either on Windows 7 (laptop), godot 3.1 beta 3, american keyboard layout.
It seems non-reproducible in Ubuntu 18.10
This happens to me every time. It's caused by the keyboard. I use the Razer Blackwidow Chroma V2 (QWERTY,Windows with US-INT layout) and I need to hit the quotation mark two times to show
""
If you press it once, nothing appears unless you press another key and it it looks like this:
"s
This is implemented due to special letters like 脛,脣,脰,.. that can only be typed using the quotation mark following the letter (the whole thing also applies for single quotation marks 谩,茅,贸,...).
Other editors don't care what kind of layout you have so I normally just hit the button two times to get "" and than move into the marks.
Godot on the other hand jumps to the bottom of the script while selecting everything from the start of the mark to the end of the script. Godot probably interpretes the double press of a quotation mark as something else, resulting in the selection.
I hope this gets a fix, hitting double " works with everything else but Godot and I will not misplace years of muscle memory for on editor.
I can't reproduce this on Godot 3.1 on OSX, however it seems godot is acknowledging your double double quotes as a "select all" shortcut. Does removing the shortcut (Editor->Editor Settings->Shortcuts->Select All) affects this?
I can't reproduce this on Godot 3.1 on OSX, however it seems godot is acknowledging your double double quotes as a "select all" shortcut. Does removing the shortcut (Editor->Editor Settings->Shortcuts->Select All) affects this?
Nope, doesn't help. Is there a debug option for Godot to see what function is called when you press double quotation marks?
Same issue, you can "workaround" pressing " once, then space to cancel, but still is terrible not only for the extra step, but because easily you can end up erasing the whole rest of your code.
I'm using English International keyboard and Windows 10.
Can't reproduce on Mageia 7 Linux with English (US) International layout with dead keys. Seems to be specific to that layout and Windows.
Same problem with Dutch keyboard layout apparently as per #19976 (also on Windows).
Can reproduce in 3.2 with US International layout under Windows 10 (US Keyboard works alright) 馃.
Have to press twice the quotation mark to put it in as well.
Have to press twice the quotation mark to put it in as well.
That's normal on that layout as quotation mark is a dead key and can be used to compose accented characters. So to input it you have to press it twice, or press once and then space. But somehow it seems to mess up the TextEdit or CodeTextEditor.
The problem could be in the input system.
I did a little test to display which keys are detected in this case.
func _input(event):
if event is InputEventKey:
if !(event.is_echo()):
print (str(event.pressed) + " " + str(event.scancode) + " " + event.as_text());
Pressing (and releaseing) Shift+" the first time:
True 16777237 Shift
True 39 Shift+Apostrophe
False 39 Shift+Apostrophe
False 16777237 Shift
And the second time:
True 16777237 Shift
True 39 Shift+Apostrophe
True 16777236 Shift+PageDown
False 39 Shift+Apostrophe
False 16777237 Shift
Or without releasing Shift in between:
True 16777237 Shift
True 39 Shift+Apostrophe
False 39 Shift+Apostrophe
True 39 Shift+Apostrophe
True 16777236 Shift+PageDown
False 39 Shift+Apostrophe
False 16777237 Shift
Similar problem: pressing ' twice:
True 39 Apostrophe
False 39 Apostrophe
True 39 Apostrophe
True 16777233 Right
False 39 Apostrophe
(using Windows 10 with Dutch keyboard layout)
I did a little test in C++, printing the windows messages.
Note that the first WM_KEYDOWN/WM_KEYUP pair has no WM_CHAR and the next pair has two.
Typing "":
WM_KEYDOWN: 0x10
WM_KEYDOWN: 0xde
WM_KEYUP: 0xde
WM_KEYDOWN: 0xde
WM_CHAR: "
WM_CHAR: "
WM_KEYUP: 0xde
WM_KEYUP: 0x10
Typing '':
WM_KEYDOWN: 0xde
WM_KEYUP: 0xde
WM_KEYDOWN: 0xde
WM_CHAR: '
WM_CHAR: '
WM_KEYUP: 0xde
Fix it
Control Panel\Clock, Language and Region\Language\Language options
Set the Handwriting to Write each character separately
Fix it
Control Panel\Clock, Language and Region\Language\Language options
Set the Handwriting to Write each character separately
Not quite sure which option you are referring to, but that is not a fix but a workaround (the same as changing the keyboard to English). The bug itself needs to be fixed instead of requiring users to change their settings.
This issue appears for me too in Godot 3.2 with English (US) - United States-International keyboard selected on Windows 10 (1903)
I swear every time I put "" and go typing and delete a block of my code.
Than go ctrl + z just to repeat it again...
And yeah most of the time a do " and space .. but from time to time when I forget... ugh
Most helpful comment
The problem could be in the input system.
I did a little test to display which keys are detected in this case.
Pressing (and releaseing) Shift+" the first time:
True 16777237 Shift
True 39 Shift+Apostrophe
False 39 Shift+Apostrophe
False 16777237 Shift
And the second time:
True 16777237 Shift
True 39 Shift+Apostrophe
True 16777236 Shift+PageDown
False 39 Shift+Apostrophe
False 16777237 Shift
Or without releasing Shift in between:
True 16777237 Shift
True 39 Shift+Apostrophe
False 39 Shift+Apostrophe
True 39 Shift+Apostrophe
True 16777236 Shift+PageDown
False 39 Shift+Apostrophe
False 16777237 Shift
Similar problem: pressing ' twice:
True 39 Apostrophe
False 39 Apostrophe
True 39 Apostrophe
True 16777233 Right
False 39 Apostrophe
(using Windows 10 with Dutch keyboard layout)