-
Notifications
You must be signed in to change notification settings - Fork 3k
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
macOS: unexpected characters get deleted when using backspace in Pinyin input method #1606
Comments
Same on head |
Looks like the intended behavior is that while the popup is open, the backspace key should be ignored? Is that correct? |
@chrisduerr seems the common behavior (what I see from the UI) is: when input "ceshi" with Pinyin input method, there are actual letters (with underline) in the software's box (not only in the popup) waiting for further instructions. Notes/Paper/Browser/search bars of other softwares on macOS work like this. Haven't looked into the key events... |
This is related to #1613 and a solution to that issue would probably also solve this one. |
Same here on macOS Mojave 10.14. I would like to help resolving this issue. @chrisduerr Would you mind to shed some light on it? |
Is there any solution ? |
@coderhwz If you want to see a solution to this issue, your best choice is to try and look into this yourself. I'm always happy to help you out if you're interested at resolving this problem. However as long as an issue is still open, there is no solution. Rather than commenting, which sends a notification to everyone watching the repository, I'd recommend subscribing to the issue for updates. |
I think winit should not capture delete events on the input method |
so how to do ? |
Is there any solution? |
Hi,,When I input the chinese words. it's show messy code. like this |
A workaround in macOS: hold command key when press backspace |
This occurs also in japanese input method which is installed by default. Please ignore keys while preediting (generally called "over-the-spot" ? I don't know macOS API and input method well though). And this is off-topic though, I can't input any japanese characters #1101 I'm using:
|
same problem 😞 |
same here. |
it's 2020, no solution? |
It's 2020, you should know that bumping issues over and over again just means there will be less work done fixing problems and more work handling issues. If you're not satisfied with the priority of an issue, patches are always welcome and I'm happy to mentor anyone who's trying to help out. |
after adding some println!, I find the problem is key_bindings:
- { key: Back, action: ReceiveChar} into your configuration. |
@ngn999 awesome it's work for me |
@ngn999 That's a very good catch, thanks for pointing it out. It seems like on macOS the ^? character is sent by default, making it so this binding is not actually required. On Linux, the backspace is ^H by default so we have this binding to change things into ^?. It seems like we should be able to remove this binding from macOS and just use it for Windows/Linux and that should fix this issue? Though I don't know if it is required on Windows, if anyone is willing to help, please let me know. |
Also if someone has a Rust toolchain installed, please let me know if this works: #3264. |
Reported upstream in rust-windowing/winit#1452. |
This reverts commit 7f4dce2. Originally it was assumed that macOS always sends the \x7f on backspace anyways, however this is not true. It seems like the character on backspace can change even within the same terminal session, so we need to have our own binding to reliably set the correct binding. A solution for #1606 should be implemented in cooperation with winit.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This reverts commit 7f4dce2. Originally it was assumed that macOS always sends the \x7f on backspace anyways, however this is not true. It seems like the character on backspace can change even within the same terminal session, so we need to have our own binding to reliably set the correct binding. A solution for alacritty#1606 should be implemented in cooperation with winit.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
That's probably best discussed on Kitty's issue tracker. ;) I have no problem with using alternative emulators if they work better for you, but please keep the responses on topic for Alacritty, otherwise it's going to be much more difficult to actually follow the conversation to fix things when the time has come. |
To be clear,this only fixes the backspace key, but @tyru 's issue about the arrow keys still exists. |
in vim editor, this binding cause backspace not work |
I found that backspace key produces ^H rather than ^? after typing with Chinese IME, maybe you can change your vim config to adapt that. |
Adding configuration one by one will result in the backspace key not working in Tmux. |
This comment has been minimized.
This comment has been minimized.
This configures only fixes the origin issue, but when I use Tmux or Neovim terminal this solution will make backspace not working. |
@cstsunfu it works on the last version alacritty + tmux, maybe alacritty fix something. |
@ngn999 It dosnt work for me without set |
@dyxushuai yeah, you should set @chrisduerr any update on this issue? what can I do to help? |
[macOS: unexpected characters get deleted when using backspace in Pinyin input method](alacritty/alacritty#1606)
Fixed with latest commit. |
Which operating system does the issue occur on? macOS 10.13
When input Chinese characters, if I use backspace to remove some letters ( as part of the Pinyin structure), it will get the characters which are just before the cursor of alacritty deleted (not what I intend to do).
I have tested it with the input method in the gifs and macOS's default Pinyin input methods, and with the fresh installed alacritty on other people's maxOS (also 10.13), all reproduced the case.
gifs for different behaviors of alacritty and iTerm2.
![alacritty](https://user-images.githubusercontent.com/4989558/46242417-83c91080-c3fb-11e8-94a0-181ac3fef756.gif)
![iterm2](https://user-images.githubusercontent.com/4989558/46242421-875c9780-c3fb-11e8-84eb-2b4ad5de5cc4.gif)
The text was updated successfully, but these errors were encountered: