daipeihust/im-select
daipeihust/im-select has 1,367 GitHub stars and 90 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-06 09:09 UTC. Last push 2024-05-25.
📟 Switch your input method through terminal
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalWelcome to im-select 👋

Prerequisites
- using VSCodeVim
- have a Mac/Windows/Linux device
- download git-bash(if you on windows)
- know how to use shell
Install
macOS
Homebrew
brew tap daipeihust/tap
brew install im-select
Or you can run following command in your console:
curl -Ls https://raw.githubusercontent.com/daipeihust/im-select/master/install_mac.sh | sh
The im-select program will be downloaded to your /usr/local/bin/ path.
windows
Download the im-select.exe, and move it to the proper path.(If you need the 64 bit version, you can download this one.)
linux
You don't have to install this for linux. linux have tools to switch input methods
Usage
macOS
If your PATH contains /usr/local/bin, you can just use im-select instead of /usr/local/bin/im-select
To get current input method key
/usr/local/bin/im-select
To switch current input method
/usr/local/bin/im-select imkey
For example /usr/local/bin/im-select com.apple.keylayout.US
linux
ibus
@mengbo provided this configuration for ibus
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "xkb:us::eng",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/ibus engine",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/ibus engine {im}"
xkb-switch
@VEL4EG provided this configuration for xkb-switch
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "us",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/local/bin/xkb-switch",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/local/bin/xkb-switch -s {im}"
fcitx
@yunhao94 provided this configuration for fcitx
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "1",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/fcitx-remote",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/fcitx-remote -t {im}",
gdbus
@d-r-q provide this configuration for gdbus
Put gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().currentSource.index" | awk -F'[^0-9]*' '{print $2}' into get-im.sh.
Put gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[$1].activate()" into set-im.sh.
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "0",
"vim.autoSwitchInputMethod.obtainIMCmd": "<path to get-im.sh>",
"vim.autoSwitchInputMethod.switchIMCmd": "<path to set-im.sh> {im}",
qdbus (KDE)
@igorechek06 provided this configuration for qdbus
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "0",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/qdbus org.kde.keyboard /Layouts getLayout",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/qdbus org.kde.keyboard /Layouts setLayout {im}",
windows
The im-select.exe is command line program, but it can't work in cmd or powershell. It's microsoft's bug, the keyboard API doesn't support in cmd and powershell. I recommend you git-bash.
Note: The git-bash is not required. It's only used to get current input method key, which needed in VSCodeVim's configuration.
Run tests
To get current keyboard locale
/path/to/im-select.exe
To switch current keyboard locale
/path/to/im-select.exe locale
Note: The path in windows is like: C:\Users\path\to\file
Author
🤝 Contributing
If you find some issues, welcome to create pull request!
Show your support
Give a ⭐️ if this project helped you!
Buy me a coffee, if you like it! If you have any problems, you can contact me via email!
📝 License
This project is licensed under the terms of the MIT license.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,460 starspublic-apis/public-apis
A collective list of free APIs
496,777 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
438,279 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,080 stars