Not only is it slow, when the mouse cursor happens to be in the center of the screen, you might end up selecting the wrong language!
We're going to set up a process that runs on startup, intercepts the fn
key and fulfills exactly the same action - except without the annoying pop-up.
- (Ventura) Go to System Settings -> Keyboard -> set this to "Do Nothing"
- Allow
zsh
to monitor and modify your keyboard input:
# Install issw
brew install cmake
git clone https://github.com/norflin321/input-source-switcher.git
pushd .
cd input-source-switcher
mkdir build && cd build
cmake ..
make
sudo make install
popd
rm -rf input-source-switcher
# Create launchd directory
mkdir ~/Library/LaunchAgents/fn_lang_switcher
# Get plist and python script
curl --request GET -sL \
--remote-name-all\
--output-dir ~/Library/LaunchAgents/fn_lang_switcher/\
--url 'https://github.com/norflin321/fn-lang-switcher/raw/main/fn.py'\
--url 'https://github.com/norflin321/fn-lang-switcher/raw/main/fn.plist'
# Start the process
launchctl load -w ~/Library/LaunchAgents/fn_lang_switcher/fn.plist
# To stop the process at a future point in time:
# launchctl unload -w ~/Library/LaunchAgents/fn_lang_switcher/fn.plist
You're good to go! Enjoy.
- Install issw, a small utility for macOS to switch input sources from the command line. By default, the program will be installed as
/usr/local/bin/issw
.
(you may need tobrew install cmake
if you haven't already)
git clone https://github.com/norflin321/input-source-switcher.git
cd input-source-switcher
mkdir build && cd build
cmake ..
make
make install
- Download fn.py and fn.plist (right click -> save as). Place them both in your
Downloads
folder. - Copy the plist file (service specification) and the python script to launchctl:
mkdir ~/Library/LaunchAgents/fn_lang_switcher
cp ~/Downloads/fn.plist ~/Downloads/fn.py ~/Library/LaunchAgents/fn_lang_switcher/
- Set the process to load on system startup:
launchctl load -w ~/Library/LaunchAgents/fn_lang_switcher/fn.plist
To stop it at a future date, runlaunchctl unload -w ~/Library/LaunchAgents/fn_lang_switcher/fn.plist
You can toggle input source with "fn" button, but without showing the pop up!