-
Notifications
You must be signed in to change notification settings - Fork 933
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: Implement NSTextInputClient #518
Conversation
Note that this isn't perfect: #263 (comment)
|
Cool thing, I was recently realized this is needed and changes arrived even before I dig into impl :) I'll try some quick testing around tomorrow once I get to access to my mac machine. |
Also (somewhat) related : servo/servo#20770 |
I just gave it a try and it doesn't look like working as expected - I tried simple KR char composition to
Particular odd point is
and it doesn't have specific rules, 1 emits when composition starts, but 2 is neither composition starts nor composition end (cause last consonant |
I tried with 390 Sebulshik, and I seem to be able to produce the desired sequence in Alacritty, just like in Terminal.app. |
But still in those cases, what's recommended way to process keyevt with compositions? In this case receivedcharacter is pretty much unusable, so applications have to filter it away and compose via keyboardinput only. For cases like broswers implements composition* event, it surpresses keydown while composition's in progress so it is acceptable (filter out receivedchar) but
|
There's not currently a recommendation, and there's plenty of API design that needs to be done. I'm open to suggestions (and detailed explanations of requirements), but it's not something I can put much time into at present. |
I see. I'll try to check few other things than receivedcharacter event as well. |
So for non-emitting |
Yeah, I'd like to get this merged and worry about further improvements afterwards. |
Dead keys are not working for me at all with this version, also Japanese input also does not work. I could however switch keyboard while Alacritty was focused. I'm on Sierra(10.12.6) |
@k0nserv with what specific input sources? |
Hi @francesca64 thanks for this awesome fix (now I can finally input tildes in spanish characters :) ). Two things I did notice when using your alacritty branch on Mac and U.S keyboard layout are: i) before I used to be able to hold the Once again thanks for such an amazing work. Btw Will there be a PR to alacritty with these changes? |
If it happens in Terminal.app, then it's expected. If not, well, then I need to fix it. Does the enter key issue only happen in vim? I'll make a PR on Alacritty once winit 0.15.0 is released (#530) and it makes its way into glutin (rust-windowing/glutin#1021). |
I'm always on alacritty (not using terminal.app). The Enter issue happens only on tmux (and not on vanilla /plain alacritty). The j (or k) issue happens in both cases and inside vim or outside (for instance using less). It might have something to do with my own setup if you cannot reproduce it. Thanks! |
I'll be sure to investigate that before releasing anything. I'm guessing the i/j thing happens with any key? |
Indeed.
Thank you! |
@petobens |
I was using Swedish Pro and trying to type e.g ´ procudes the following.
The hardware keyboard in this case is a UK apple magic, worth noting that equals is what is printed on the key used and what you get when using a UK layout. |
@k0nserv that's not a regression, is it? If it's not a regression, then please report an issue for it. I'm quite exhausted, so at the moment I'm only addressing things that block a release. |
Nope it’s not a regression, but I guess it might be an edge case? Anyway thanks for the great work 👍 |
@francesca64 both fixes work :) Thank you!! |
Sets whether the window should get IME events. When IME is not allowed, the window won’t receive Ime events, and will receive KeyboardInput events for every keypress instead. Without allowing IME, the window will also get ReceivedCharacter events for certain keyboard input. Not allowing IME is useful for games for example. https://docs.rs/winit/latest/winit/window/struct.Window.html#method.set_ime_purpose rust-windowing/winit#518 rust-windowing/winit#625 alacritty/alacritty#2017 servo/servo#20770
Issues this hopefully fixes:
Can't type russian characters alacritty/alacritty#1064❌(I'm not sure about all of these. Hopefully we can get feedback on most of them.)
Alacritty branch for easy testing: https://github.com/francesca64/alacritty/tree/macos-kb
@kwonoj are you interested in trying this out?