二年多前在淘寶買的RK987藍芽雙模鍵盤,在Linux/Ubuntu下的F1-F12總是會模擬成多媒體鍵(不管有無加上Fn),用lsusb指令查看,發現這鍵盤的vid:pid是05ac:024f,名稱是Apple Keyboard,才發現這鍵盤把自已假裝成Apple鍵盤了,這導致Linux會自動載入hid_apple驅動,但這鍵盤的F1-F12卻又無法正常使用。
解法是修改Fn的預設行為:
echo "options hid_apple fnmode=2" | sudo tee -a /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u <for Ubntu/Debain>
sudo mkinitcpio -P <for Arch>
並將鍵盤模式用Fn+A切換成WIN模式。
下面解釋了Fn設為0,1,2的不同:
- 0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'
- 1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.
- 2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause).
ref:
https://unix.stackexchange.com/questions/604791/keyboard-function-keys-always-trigger-media-shortcuts-regardless-of-whether-fn
https://unix.stackexchange.com/questions/121395/on-an-apple-keyboard-under-linux-how-do-i-make-the-function-keys-work-without-t
https://unix.stackexchange.com/a/672672
沒有留言:
張貼留言