fix apple keyboard

This commit is contained in:
Simon Rieger 2025-04-29 20:02:47 +02:00
parent d3145582a6
commit 68a3a345e9
2 changed files with 18 additions and 17 deletions

View file

@ -0,0 +1,15 @@
#!/bin/bash
echo "Ändere Apple Funktionstaste mit der Kontrolltaste!!!"
echo "Ändere Apple Commandtaste mit der Altasten!!!"
# Temporäre Änderung
# Command (⌘) und Alt (⌥) tauschen
echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
# Fn und linke Control-Taste tauschen
echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_fn_leftctrl
# Dauerhafte Konfiguration
echo -e "options hid_apple swap_opt_cmd=1\noptions hid_apple swap_fn_leftctrl=1" | sudo tee /etc/modprobe.d/hid_apple.conf
sudo dracut -f

View file

@ -1,17 +1,3 @@
{{- if and (eq .chezmoi.os "linux") (eq .chezmoi.arch "arm64") }}
#!/bin/bash
echo "Ändere Apple Funktionstaste mit der Kontrolltaste!!!"
echo "Ändere Apple Commandtaste mit der Altasten!!!"
# Temporäre Änderung
# Command (⌘) und Alt (⌥) tauschen
echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
# Fn und linke Control-Taste tauschen
echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_fn_leftctrl
# Dauerhafte Konfiguration
echo -e "options hid_apple swap_opt_cmd=1\noptions hid_apple swap_fn_leftctrl=1" | sudo tee /etc/modprobe.d/hid_apple.conf
sudo dracut -f
{{- end }}
{{ if eq .chezmoi.os "linux" -}}
{{ .chezmoi.sourceDir }}/executable_apple-keyboard-swap.sh
{{ end -}}