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

Universal clipboard shortcuts (Ctrl+C/V/X) don't work with non-Latin keyboard layouts #4081

Closed
TicClick opened this issue Feb 21, 2024 · 0 comments · Fixed by #4461
Closed
Labels
bug Something is broken

Comments

@TicClick
Copy link
Contributor

Describe the bug

at least on Windows 10 (and I think it happens on MacOS as well) these shortcuts only work in layouts with Latin characters, such as English (United States). this is because the code checking for special shortcuts operates on logical, not physical keys:

(this is present in at least egui v0.25.0, and it doesn't look like it's fixed in the current master branch, b804857)

To Reproduce

try copying any text from a text field while having a keyboard layout without a Latin character on the C hardware key

@TicClick TicClick added the bug Something is broken label Feb 21, 2024
@TicClick TicClick changed the title Universal clipboard shortcuts (Ctrl+C/V/X`) don't work with non-Latin keyboard layouts Universal clipboard shortcuts (Ctrl+C/V/X) don't work with non-Latin keyboard layouts Feb 23, 2024
emilk pushed a commit that referenced this issue May 10, 2024
…ve (#4461)

resolves #4081 (see discussion
starting from
#3653 (comment) for
extra context)

this partly restores event-emitting behaviour to the state before #3649,
when shortcuts such as `Ctrl` + `C` used to work regardless of the
active layout. the difference is that physical keys are only used in
case of the logical ones' absence now among the named keys.

while originally I have only limited this to clipboard shortcuts
(Ctrl+C/V/X), honestly it felt like a half-assed solution. as a result,
I decided to expand this behaviour to all key events to stick to the
original logic, in case there are other workflows and hotkeys people
rely on or expect to work out of the box. let me know if this is an
issue.
hacknus pushed a commit to hacknus/egui that referenced this issue Oct 30, 2024
…ve (emilk#4461)

resolves emilk#4081 (see discussion
starting from
emilk#3653 (comment) for
extra context)

this partly restores event-emitting behaviour to the state before emilk#3649,
when shortcuts such as `Ctrl` + `C` used to work regardless of the
active layout. the difference is that physical keys are only used in
case of the logical ones' absence now among the named keys.

while originally I have only limited this to clipboard shortcuts
(Ctrl+C/V/X), honestly it felt like a half-assed solution. as a result,
I decided to expand this behaviour to all key events to stick to the
original logic, in case there are other workflows and hotkeys people
rely on or expect to work out of the box. let me know if this is an
issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant