Skip to content

Fix keyboard shortcuts under non-Latin keyboard layouts#1027

Open
b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 wants to merge 4 commits into
Col-E:masterfrom
b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0:master
Open

Fix keyboard shortcuts under non-Latin keyboard layouts#1027
b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 wants to merge 4 commits into
Col-E:masterfrom
b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0:master

Conversation

@b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0

Copy link
Copy Markdown
Contributor

What's new

  • Layout-independent keyboard shortcut handling for Ctrl/Meta + letter combinations
  • Centralized key event normalization for text input controls and RichTextFX editors

What's fixed

  • Copy, paste, cut, and select-all not working in editors when a non-Latin keyboard layout was active
  • Recaf keybindings (e.g. save, find, undo) failing to trigger under non-Latin layouts
  • Paste-to-add-files shortcut in workspace builder not working with non-Latin layouts

@Col-E

Col-E commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Layout-independent keyboard shortcut handling for Ctrl/Meta + letter combinations

FXMisc/RichTextFX#1255 - IIRC this was fixed upstream for RichTextFX text area components (Save, find, etc in the decompiled code editor)

When we reported the issue, those combinations did work with alternative key layouts (core JavaFX controls)/ These combinations not working anymore in the places you've made fixes to seems to imply a regression upstream in core FX. Could you try and re-create the problem with these keys not working on a basic hello-world scale JavaFX screen?

Centralized key event normalization for text input controls and RichTextFX editors

I have no idea what this means.

@b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0

Copy link
Copy Markdown
Contributor Author

Could you try and re-create the problem with these keys not working on a basic hello-world scale JavaFX screen?

Tested with a minimal JavaFX repro (TextField, TextArea, RichTextFX CodeArea) on a non-Latin keyboard layout — Ctrl+C/V works in all three. So this doesn't look like a core JavaFX regression on my side; the issue appears Recaf-specific. I'll narrow the PR to Recaf keybinding matching and remove the scene-level event normalization.

@b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0

Copy link
Copy Markdown
Contributor Author
1.mp4

@b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0

Copy link
Copy Markdown
Contributor Author

I have no idea what this means.

That line meant a scene-level filter that re-dispatched key events when Ctrl+letter produced a layout-specific KeyCode instead of the expected one. I've removed it. Hello-world testing showed copy/paste already works in core JavaFX and RichTextFX, so the PR now only covers Recaf keybinding matching.

Also added the missing Russian translations in the same PR. I know it would've been cleaner as a separate PR, but I already had this one open, so I just whipped up a quick Python script to sync the keys with en_US and filled in the translations.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants