YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
22 stars 8 forks source link

Code Editor: [Mac IDE] Certain keyboard shortcuts do not work when using specific language keyboard layouts through Input Sources #953

Open iampremo opened 1 year ago

iampremo commented 1 year ago

GM-6695

In the Mac IDE, certain keyboard shortcuts will not work in any Code Editor when using Russian, Korean, Chinese or Japanese keyboard layouts through Input Sources.

This appears to affect all keyboard shortcuts expect for undo/redo.

!image-2023-01-25-14-04-48-043.png|!

Steps:

Repro: 100%

yerumaku commented 5 months ago

This appears to affect all keyboard shortcuts expect for undo/redo.

Undo/redo also does not work.

MahradH commented 5 months ago

Same on Ubuntu. When I open GameMaker and my language is not English (in my case Persian), no keyboard shortcut will work. changing the language to English will not fix the problem. I should close the GameMaker and reopen it while my keyboard language is English

SmithTom6304 commented 5 months ago

Will take a look at this one for the June release - thanks guys

yerumaku commented 4 months ago

Is there any information about how difficult it is to fix this problem?

yerumaku commented 1 month ago

@stuckie @SmithTom6304 Will it be shifted to 2024.10?

SmithTom6304 commented 1 month ago

Sorry @yerumaku, didn't see your last comment. It's still planned for 2024.8. Haven't had a chance to look into yet, so not sure how hard it'll be to fix.

SmithTom6304 commented 1 month ago

The problem stems from the fact that our hotkey system is based on KeyCode values, rather than ScanCode values. ScanCode values can be thought of as the physical key on the keyboard, whereas KeyCode values are mapped to the layout of the keyboard (the language source). For example, on a Russian keyboard the key Ч replaces the key X on an english keyboard. With the russian language source active pressing this key would produce a KeyCode of Ч, but still produce a Scancode of X. Since our hotkeys are currently tied to the KeyCode values, it is impossible to press Ctrl + X (cut) on a russian keyboard as there is no X KeyCode on a russian keyboard.

Fixing this will require reworking our internal hotkey handling to instead use scancodes. This is fairly straightforward, but unfortunately is too much of a rework to go into 2024.8 and so will go into 2024.10 to give our QA team enough time to verify the change.

yerumaku commented 1 month ago

Thank you for your reply, I hope that I will be able to see the results in Beta in September-October, and hopefully this fix will apply to LTS.

yerumaku commented 4 weeks ago

@SmithTom6304

Was there any information about whether replacing the methods of getting from the keyboard helps?

until we know it works it is unlikely to get into LTS

As far as I understand, LTS is already close enough, but LTS is unpleasant to use on macOS/Linux due to input difficulties.

Is it possible to make some kind of wrapper over the input, and a flag to be able to switch the method of getting the key code?

YYDan commented 1 week ago

There is no Ubuntu IDE LTS.