Swiftpack.co - Package - jeantil/autokbisw

Autokbisw - Automatic keyboard input source switcher

Motivation

This small utility was born out of frustation after a mob programming sesssion. The session took place on a french mac book pro, using a pair of french pc keyboards. Some programmers were used to eclipse, others to intellij on linux, others to intellij on mac.

While OSx automatically switches the layout when a keyboard is activated it doesn't change the keymap, meaning we had to remember changing both the os and the IDE keymap each time we switched developper.

This software removes one of the switches: it memorizes the last active osx input source for a given keyboard and restores it automatically when that keyboard becomes the active keyboard.

Installation

From Binaries

Download one of the binary packages from this repository releases, unzip its content to whatever folder suits you and run it.

If you want the program to start automatically when you log in, you can copy the provided plist file to ~/Library/LaunchAgent and load it manually for the first run:

cp eu.byjean.autokbisw.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/eu.byjean.autokbisw.plist

Via Homebrew

brew install jeantil/autokbisw/autokbisw

From Source

Clone this repository, make sure you have xcode installed and run the following command:

swift build --configuration release

In the output will be the path to the built program, something like ${PWD}/.build/release/autokbisw.

You can run it as is or install it :

cp ${PWD}/.build/release/autokbisw /usr/local/bin/
cp autokbisw/eu.byjean.autokbisw.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/eu.byjean.autokbisw.plist

Github

link
Stars: 69
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

1.2.0 - Oct 18, 2018

This release makes the project compatible with homebrew's policy

1.1.0 - Oct 27, 2017

This new release fixes 2 user experience issues :

  • #6 support multiple external keyboards without serial numbers
    This is fixed by introducing a -l or --location parameter to program startup which includes the keyboards locationId in the keyboard identifier used for the mapping. This will effectively associate the input source with a specific keyboard plugged on a specific usb port. Moving the same keyboard to a different USB port will result in a new keyboard id and mapping being registered. A repeatable -v flag has also been introduced to help in troubleshooting for future issues.

  • #5 Save settings on restart The state of keyboard mappings is now saved to UserDefaults and reloaded on restart. This is especially useful after a reboot.

1.0.0 - Nov 28, 2016

This software memorizes the last active osx input source for a given keyboard and restores it automatically when that keyboard becomes the active keyboard.