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

Code Editor: [Mac/Ubu IDE] Certain keyboard shortcuts do not work when using specific non-Roman language keyboard layouts #953

Closed
iampremo opened this issue Jul 31, 2023 · 20 comments
Assignees
Labels
ide-bug Bugs with the GameMaker IDE import An issue imported from the old database
Milestone

Comments

@iampremo
Copy link
Member

iampremo commented Jul 31, 2023

In the Mac and Ubuntu IDEs, certain keyboard shortcuts will not work in any Code Editor when using various non-Roman character keyboard layouts through Input Sources.

Affected:
Russian
Chinese
Japanese
Korean
Persian

Steps To Reproduce

  1. Open your Mac's System Preferences and open Keyboard > Input Sources (or the Ubuntu equivalent)
  2. Add all of the languages listed above and check "Show input menu in menu bar"
  3. Use the new icon in the top left of the menu bar to switch your keyboard layout to one of the newly-installed languages
  4. Start GM and open/create any project
  5. Create a new Note or Script
  6. Type some letters and attempt to copy and paste them from the IME to the code editor
  7. Observe the issue
    Repro: 100%
@yerumaku
Copy link

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

Undo/redo also does not work.

@MahradH
Copy link

MahradH commented Apr 11, 2024

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 SmithTom6304 moved this from Triage to Todo in Team Workload Apr 11, 2024
@SmithTom6304 SmithTom6304 added this to the 2024.6 milestone Apr 11, 2024
@SmithTom6304
Copy link

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

@yerumaku
Copy link

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

@stuckie stuckie modified the milestones: 2024.6, 2024.8 May 29, 2024
@yerumaku
Copy link

yerumaku commented Aug 2, 2024

@stuckie @SmithTom6304
Will it be shifted to 2024.10?

@SmithTom6304
Copy link

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 SmithTom6304 moved this from Todo to In Progress in Team Workload Aug 2, 2024
@SmithTom6304
Copy link

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.

@SmithTom6304 SmithTom6304 moved this from In Progress to Todo in Team Workload Aug 2, 2024
@SmithTom6304 SmithTom6304 modified the milestones: 2024.8, 2024.10 Aug 2, 2024
@yerumaku
Copy link

yerumaku commented Aug 2, 2024

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
Copy link

@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
Copy link
Collaborator

YYDan commented Sep 10, 2024

There is no Ubuntu IDE LTS.

@YYDan YYDan moved this from Todo to In Progress in Team Workload Sep 10, 2024
@yerumaku
Copy link

Is there any information about the feature?

@SmithTom6304
Copy link

No new information I'm afraid - other work has taken a priority.

@stuckie stuckie modified the milestones: 2024.11, 2025.1 Oct 15, 2024
@yerumaku
Copy link

I hope this feature gets into LTS, despite the postponement to next year.

@YYDan YYDan changed the title Code Editor: [Mac IDE] Certain keyboard shortcuts do not work when using specific language keyboard layouts through Input Sources Code Editor: [Mac/Ubu IDE] Certain keyboard shortcuts do not work when using specific non-Roman language keyboard layouts Nov 27, 2024
@SmithTom6304 SmithTom6304 moved this from Todo to In Progress in Team Workload Nov 29, 2024
@yerumaku
Copy link

This is good news for the GameMaker community from all over the world!
❤️
Good luck with the task!

@yerumaku

This comment has been minimized.

@Emc1923
Copy link

Emc1923 commented Dec 6, 2024

Unable to reproduce this issue on Windows as of IDE v2024.1100.0.703 Runtime v2024.1100.0.719

@mgeddesGM
Copy link

unable to reproduce on windows IDE v2024.1100.0.703 Runtime v2024.1100.0.719, additionally i used an external keyboard

@yerumaku
Copy link

yerumaku commented Dec 8, 2024

@mgeddesGM @Emc1923
But the problem is on Unix systems, not on Windows.

About KeyCode/ScanCode in comment

@SmithTom6304
Copy link

@yerumaku I'd asked QA to take a look on Windows as well.
I have a fix that should be ready to go in soon. The fix won't be in v2024.11, but will be in the v2024.13 betas

@SmithTom6304
Copy link

SmithTom6304 commented Dec 9, 2024

Fix has now gone in, and should appear in the first 2024.13 beta.
This fix has also led to a change in the hotkey and remap file formats, which now support upgrading / downgrading of versions. The IDE now contains tests to check that old remap files can be loaded in current versions of the IDE.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Workload Dec 9, 2024
@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide-bug Bugs with the GameMaker IDE import An issue imported from the old database
Projects
Status: Ready for QA
Development

No branches or pull requests

8 participants