MacOS app to make function keys default on Logitech k380 bluetooth keyboard
- Install
hidapilibrary
brew install hidapi- Build this app
# suitable for intel chip mac
./build_Intel.sh
# suitable for apple silicon mac
./build_Apple_Silicon.sh
- Run it as root (Note that you might be asked to give permissions for terminal app to access input device)
sudo ./k380 -f on
Build a native Linux binary with the hidapi-hidraw backend:
# Arch: sudo pacman -S hidapi
# Debian/Ubuntu: sudo apt install libhidapi-dev
# Fedora: sudo dnf install hidapi-devel
./build_Linux.sh
sudo ./k380-linux -f onbuild_Linux.sh writes ./k380-linux (ELF) and never overwrites the tracked
macOS ./k380 binary, so one checkout can serve both systems. To expose the
same k380 command as on macOS, see
TROUBLESHOOTING.md.
k380 links against the Homebrew hidapi dylib at runtime, so hidapi must
stay installed after building. Homebrew does not know this hand-built binary
depends on it, so brew autoremove / cleanup may remove it as an orphan.
If running k380 aborts with:
dyld[...]: Library not loaded: /opt/homebrew/opt/hidapi/lib/libhidapi.0.dylib
Referenced from: .../k380
Reason: tried: '/opt/homebrew/opt/hidapi/lib/libhidapi.0.dylib' (no such file)
just reinstall it:
brew install hidapiTo prevent it from being removed again, either pin it (brew pin hidapi) or make
the binary self-contained by copying the dylib next to it and rewriting the load
path with install_name_tool. See AGENTS.md for the full details.