mac-left-option-ime-switcher
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "mac-left-option-ime-switcher" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-467f7e1756e8c0adea7ff87b609756f0c255a07a230c4243c1f8f99175dea5fb. Verify the upstream source and version against https://skillhub.cn/skills/user_b85d9503/option-input-switch before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A macOS global automation setup and troubleshooting guide to temporarily switch input methods while holding the left Option key. Intended for users who want left-Option-hold input-method switching on Mac, particularly between Sogou and Doubao input methods. The approach is based on Hammerspoon keyboard-event listening and involves accessibility/input-monitoring permission configuration; the workflow can be shared with colleagues.
Introduction source: third_party · user_b85d9503 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Install and troubleshoot a macOS global automation that temporarily switches input methods while the left Option key is held. Use when a user wants Mac left Option hold-to-switch behavior, especially Sogou-to-Doubao IME switching, Hammerspoon-based keyboard event monitoring, Accessibility/Input Monitoring permission setup, or sharing this workflow with coworkers.
- Testing
- Not tested
Browse files
Frontmatter
name: mac-left-option-ime-switcher
description: Install and troubleshoot a macOS global automation that temporarily switches input methods while the left Option key is held. Use when a user wants Mac left Option hold-to-switch behavior, especially Sogou-to-Doubao IME switching, Hammerspoon-based keyboard event monitoring, Accessibility/Input Monitoring permission setup, or sharing this workflow with coworkers.Mac Left Option IME Switcher
Use this skill to install a Hammerspoon automation on macOS:
- Hold left Option: switch to Doubao IME.
- Release left Option: switch back to Sogou IME.
- Right Option is ignored.
- Other key events are observed only and not swallowed.
The tested input source IDs are:
- Sogou:
com.sogou.inputmethod.sogou.pinyin, fallbackcom.sogou.inputmethod.pinyin - Doubao:
com.bytedance.inputmethod.doubaoime.pinyin
Workflow
- Run
scripts/install_left_option_ime_switcher.sh. - If the script opens System Settings, make sure Hammerspoon is enabled in both:
- Privacy & Security > Accessibility
- Privacy & Security > Input Monitoring
- Restart Hammerspoon when macOS asks, or run:
osascript -e 'tell application "Hammerspoon" to quit' || true
open -g /Applications/Hammerspoon.app
- Ask the user to test a real left Option press and release.
- Inspect
~/.hammerspoon/left_option_ime.logif anything fails.
Important Details
- Prefer Hammerspoon over a custom LaunchAgent for this workflow. On recent macOS versions, raw event taps may need both Accessibility and Input Monitoring; Hammerspoon handles this more predictably once it has permissions.
- If Hammerspoon is running from
Downloadsvia App Translocation, copy it to/Applications/Hammerspoon.appand launch it from there. - Stop any older custom helper named
com.local.left-option-ime-switcherto avoid duplicate logic. - Use
hs.keycodes.currentSourceID(...)for switching, not keyboard shortcuts. - Left Option keyCode is
58; right Option is different and should be ignored.
Verify
Run:
osascript -e 'tell application "Hammerspoon" to execute lua code "return hs.inspect({secure=hs.eventtap.isSecureInputEnabled(), tap=leftOptionImeTap and leftOptionImeTap:isEnabled(), current=hs.keycodes.currentSourceID(), methods=hs.keycodes.methods(true)})"'
tail -n 80 ~/.hammerspoon/left_option_ime.log
Expected:
secure = falsetap = true- input methods include Sogou and Doubao source IDs
- log records
select ...doubao...on left Option down andselect ...sogou...on release
If simulated events work but real key presses do not, Input Monitoring permission is missing or stale. Open:
open 'x-apple.systempreferences:com.apple.preference.security?Privacy_ListenEvent'
Then add or enable /Applications/Hammerspoon.app.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 macOS 下基于 Hammerspoon 的输入法切换自动化方案,针对搜狗与豆包输入法用户有明确实用价值
- 功能闭环完整,包含安装、配置、验证和排查全流程
Highlights
- description 在 frontmatter 中完整定义,覆盖安装、权限设置、排查和共享等多种使用场景
- 触发词清晰,边界明确,不易与其他 Skill 混淆
Areas to improve
-
缺少 When to Use 显式章节 Reported severity: Minor
文档未设置显式的 When to Use 章节,但使用场景已在 description 和正文中充分覆盖
Recommendation: 建议增加 When to Use 章节以提升结构规范性
Highlights
- 文档结构清晰,包含 Workflow、Important Details、Verify 等实用章节
- 步骤明确,提供了具体命令和验证方式,frontmatter 完整
Highlights
- 提供了完整的权限设置指引和日志检查方法
- 包含验证命令和常见问题排查路径,提升了执行成功率
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.