From 83e09087d4565d31577715af0da2e5d4d6fef304 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 14 Oct 2023 20:03:00 +0300 Subject: move set-up-kbd.sh to 'script' dir --- scripts/set-up-kbd.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/set-up-kbd.sh (limited to 'scripts') diff --git a/scripts/set-up-kbd.sh b/scripts/set-up-kbd.sh new file mode 100755 index 0000000..f0cdbf3 --- /dev/null +++ b/scripts/set-up-kbd.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Settings for Keychron K3 v2 +# +# Settings for Keychron keyboards: https://github.com/kurgol/keychron +# Some shortcuts: https://blog.colinwaddell.com/keychron-function-keys-configuration/ +# +# NOTE: Keychron keyboards use the hid_apple driver. + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" + exit 1 +fi + +# Function keys: +# +# fnmode: +# 0 = fn key disabled +# 1 = fn key pressed by default +# 2 = fn key released by default + +echo "options hid_apple fnmode=2" >> /etc/modprobe.d/hid_apple.conf +echo "Reboot your system or notify hid_apple to reload its configuration" -- cgit v1.2.3-18-g5258