-
Notifications
You must be signed in to change notification settings - Fork 102
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: Simplifying the code #161
Conversation
I will help to test your code in my code tonight, hope the problem will go away. |
I just try the code of this commit but it still crashes at this line |
Okay, thank you for the feedback. Back to the drawing board :( |
e2d4cde
to
e200708
Compare
I pushed a few more commits. I got rid of the custom implementation of a lot of the types. Maybe there is something wrong with a type and that is why it crashes on your ARM Mac but not on my x86 Mac. It is pure guessing at this point though. If you have time, you can try out the updated code from this PR. It might fix it. If it does crash, can you please copy the output? Maybe that will give me a hint |
Ok, let me try it |
Does it crash if you execute: |
oh, I just try the example, it runs ok. It’s my fault, Maybe there is something happened in Tauri? Should I start an issue in Tauri? |
Ah, that is interesting. I don't know what Tauri does, but I think it would be helpful if you would open an issue there and ask for assistance. Please post the link so that I can follow it as well to see if there are any fixes needed from |
On macOS the library panics when using
Key::Layout
. This is likely caused by input methods being used. We had a few issues (#124) for it and a merged PR. However the problem continues #153. This is another attempt at fixing the issue.Instead of first trying to use
TISCopyCurrentKeyboardInputSource
and then checking if it was successful, we now immediately useTISCopyCurrentKeyboardLayoutInputSource
. This should work regardless of any input methods.The mac I test on does not have any input methods in use, so I never saw this issue. I also cannot reproduce it. However the code continues to work for me after the changes. I am hoping for feedback from users who had issues to tell me if this PR solves them.