Add macOS input source switching#291
Conversation
|
Hi @tingkai-c Thank you for contributing to Rustcast. Could you share a few details about this implementation and also if AI was used in the implementation of this feature? |
|
Hi @unsecretised, thanks for taking a look. Implementation details: This adds two optional config fields:
The switching is implemented in the macOS platform layer using Text Input Source APIs from Carbon:
RustCast captures the current input source in The configured source must be enabled in macOS Keyboard settings. I used enabled input sources only so disabled IDs fail cleanly instead of selecting unavailable sources. Testing:
AI usage: Yes, AI assistance was used while developing this PR. I used it as a coding/review aid for repository exploration, implementation drafting, and validation steps. I reviewed the changes manually, tested the behavior locally on macOS. |
|
Hi there. Could you elaborate more on what parts were coded with AI? It seems to be that the PR was 100% AI generated and just verified that it works by a human. As per the contributing guidelines, we don't support 100% AI PRs, as their quality is still not up to the standard I would wish them to be. If I'm wrong about the AI Usage, then please close this PR (I will assume its 100% AI generated if there's no response for the next 1 week and close this PR) If it isn't 100% AI generated, please share details such as where you used AI, what models, and why you had to use AI. |
unsecretised
left a comment
There was a problem hiding this comment.
Idk how much AI you used but i decided to review this PR either way.
Its a decent implementation, but I don't see the need for this, and also you're missing the ability to customise this from the settings page.
There was a problem hiding this comment.
Please use objc2 wherever possible (i know objc2-carbon doesn't expose sufficient APIs but things like the data types should minimally be objc2)
|
Thanks for reviewing. The need for this comes from my daily workflow. I used this behavior every day in Raycast: when I’m typing in Zhuyin or another non-Latin input method, I want the launcher to always open in a predictable Latin input source so app search and commands work immediately. Without this, I have to manually switch input sources before using RustCast. For the Settings page, I agree. I think the UX should be:
I’ll also update the implementation to use On AI usage: AI was used only for repository exploration and implementation drafting. I reviewed the code, tested it locally on macOS, and debugged the input-source behavior. I’m using OpenAI GPT-5.5 high. If there are coding style rules that I should follow beyond |
90b6608 to
a55b898
Compare
|
Pushed an update addressing the review feedback:
Checks:
|
Summary
Testing