Eu quero mapear fn-f1 para a execução de um comando no MacBook Pro 11,5. O problema é que atualmente o Fn-F1 não é detectado como nenhuma chave. Eu não sei como vinculá-los a (XF86MonBrightnessDown) e ((XF86MonBrightnessUp)
Eu tentei Algumas chaves não são detectadas no meu teclado (teclas multimídia?) pelo xev ou xbindkeys ou keytouch: como detectá-las? mas depois de instalar isso, o xev ainda não consegue detectar Fn-F1 e Fn- F2.
Eu segui o link para definir a tecla F1-F12 para funcionar como no laptop normal. Esta etapa faz o Fn-F1 em vez do F1 indetectável.
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
Encontrei códigos de verificação para fn-f1 e fn-f2
Resultado:
Fn-F1 pressed
0xe0 0x4c
Fn-F1 released
0xe0 0xcc
Fn-F2 pressed
0xe0 0x54
Fn-F2 released
0xe0 0xd4
setkeycodes não pode vincular nenhum scancode ao código da chave
Cannot bind numlock to key_A:
$ setkeycodes 45 30
setkeycodes: failed to set scancode 45 to keycode 30: ioctl KDSETKEYCODE: Invalid argument
Saída do xmodmap -pk
232 0x1008ff03 (XF86MonBrightnessDown) 0x0000 (NoSymbol) 0x1008ff03 (XF86MonBrightnessDown)
233 0x1008ff02 (XF86MonBrightnessUp) 0x0000 (NoSymbol) 0x1008ff02 (XF86MonBrightnessUp)
xev não consegue distinguir Fn-F1 e 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