Я хочу к карте fn-f1 к выполнению команды на MacBookPro 11,5. Проблема состоит в том, что в настоящее время Fn-F1 не обнаруживается как никакой ключ. Я не знаю, как связать их с (XF86MonBrightnessDown) и ((XF86MonBrightnessUp)
Я попробовал Некоторые ключи, не обнаруживаются в моей клавиатуре (мультимедийные ключи?) или xev или xbindkeys или keytouch: как обнаружить их? но после установки этого, xev все еще не может обнаружить Fn-F1 и Fn-F2.
Я следовал за https://help.ubuntu.com/community/AppleKeyboard для установки ключа F1-F12 для работы в нормальном ноутбуке. Этот шаг делает Fn-F1 вместо F1 необнаруживаемым.
Add following line to /etc/modeprob.d/hid_apple.conf:
options hid_apple fnmode=2
Run the following command:
sudo update-initramfs -u -k all
Я нашел скэн-коды для fn-f1 и fn-f2
Результат:
Fn-F1 pressed
0xe0 0x4c
Fn-F1 released
0xe0 0xcc
Fn-F2 pressed
0xe0 0x54
Fn-F2 released
0xe0 0xd4
setkeycodes не может связать scancode с кодом клавиши
Cannot bind numlock to key_A:
$ setkeycodes 45 30
setkeycodes: failed to set scancode 45 to keycode 30: ioctl KDSETKEYCODE: Invalid argument
Вывод xmodmap-pk
232 0x1008ff03 (XF86MonBrightnessDown) 0x0000 (NoSymbol) 0x1008ff03 (XF86MonBrightnessDown)
233 0x1008ff02 (XF86MonBrightnessUp) 0x0000 (NoSymbol) 0x1008ff02 (XF86MonBrightnessUp)
xev не может отличить Fn-F1 и Fn-F2
[Fn-F2 pressed with mouse out of window]
FocusIn event, serial 48, synthetic NO, window 0x2800001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 48, synthetic NO, window 0x0,
keys: 4294967206 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[Fn-F2 pressed with mouse in window]
FocusIn event, serial 48, synthetic NO, window 0x2800001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 48, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[Fn-F1 pressed with mouse in window]
FocusIn event, serial 48, synthetic NO, window 0x2800001,
mode NotifyGrab, detail NotifyPointer
KeymapNotify event, serial 48, synthetic NO, window 0x0,
keys: 4294967206 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
[Fn-F1 pressed with mouse out of window]
FocusIn event, serial 48, synthetic NO, window 0x2800001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 48, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[Fn-F1 released]
FocusOut event, serial 48, synthetic NO, window 0x2800001,
mode NotifyUngrab, detail NotifyPointer
[F1 key pressed and release]
KeyPress event, serial 48, synthetic NO, window 0x2800001,
root 0x4a6, subw 0x0, time 2628754, (87,17), root:(88,43),
state 0x0, keycode 67 (keysym 0xffbe, F1), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 48, synthetic NO, window 0x2800001,
root 0x4a6, subw 0x0, time 2628906, (87,17), root:(88,43),
state 0x0, keycode 67 (keysym 0xffbe, F1), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False