-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Dead keys not being handled #1094
Comments
Upon further investigation I understand now that the problem is lack of dead keys handling. If a dead key is pressed, nothing happens. Nothing specific about "key code 48" but it being a dead key on my keymap. Workaround: to change the keymap to a layout without dead keys. Related issue: #530 |
More information, this seems to be related to the feature of dead key preview: |
I have the same problem on MacOS with US keyboard + Dead Keys. |
I have the same issue on Arch Linux with an US keyboard set to US intl. It does seem like the editor is simply not handling dead keys at all, they don't even enter the characters on the key. |
here with Lapce |
Same here. Happening with single and double quotes, and tilde and backtick. Love the idea of using Lapce as my main code editor, but it's plainly useless without the capability of typing a single or double quote. |
The issue is in the Druid UI toolkit. Lapce inherited this issue. |
I'm experiencing the same issue here, which is unfortunate as I really liked the overall experience of Lapce... |
Is Druid still being used in the nightly builds, or is some kind of changed handling in Floem victim to the same problem as the old codebase? |
Latest lapce release doesn't use Druid anymore, it's Floem and keyboard events are provided by Winit. |
I was going to post an edit, but that was a surprisingly fast response. |
Uh, false alarm there, the code I was looking at did call ToUnicodeEx, but turned out to be using it to inspect keyboard layouts rather than processing actual input. I haven't managed to find where the actual input processing is messed up (it appears to call TranslateMessage in the main loop, which should just work unless something else is calling ToUnicode somewhere) |
I think I have finally figured out what is going on. The lapce/lapce-app/src/keypress.rs Line 181 in 592cbc7
text from the event, leaving its caller (key_down lapce/lapce-app/src/keypress.rs Line 201 in 592cbc7
key being a Key::Character or NamedKey::Space (I am still unsure why this means it discards doubled dead keys or why accented characters work, but this is the only thing that can explain a space character being entered when a dead key is followed with the spacebar) The entire key_down function will have to be rewritten.
It is worth mentioning that (assuming that winit supports it correctly) KeyUp events can also have |
I have a basic fix that seems to work, replacing the contents of the if let EventRef::Keyboard(keyevent) = event {
if let Some(text) = &keyevent.key.text {
focus.receive_char(text.as_str());
self.count.set(None);
return true;
}
} [and into-ing the event at the top of the function, since otherwise it can't be used both here and in the call to |
Happens to me on Win11, too |
With Lapce v0.3.1 (Flatpak) dead keys seem to finally be working on my machine, both with and without IME running. When running IME, the phantom text is now also rendered. |
This should be fixed via #3119 |
Which is part of 0.4.0 so please test this and report any issues |
Lapce Version
0.2.0
System information
Arch linux
Describe the bug
The key related to key code 48 is not being handled by text editor. It is also not being handled by builtin terminal.
The number 48 was extracted using the command "xinput test":
Additional information
In the keybindings settings dialog, when I press 48, I get the name "Dead" for the key:
If I assign the key 48 to the command palette command, when I press the key 48, the command palette does open.
Remarks: On my keyboard, which is english qwerty layout, key code 48 refers to double quote / single quote.
The text was updated successfully, but these errors were encountered: