Ubuntu не дает правильные коды ключей для некоторых медиа-ключей

Я только что установил Ubuntu 16.04 на своем ThinkPad T450, и по какой-то причине медиа-клавиши для регулировки громкости и яркости экрана не дают никаких кодов клавиш или клавиш (например, XF86AudioRaiseVolume). Но все остальные медиа-ключи дают правильные значения.

Странно, что медиа-ключи все еще работают отлично в единстве и gnome, это просто проблема, когда я использую i3, потому что я не могу сопоставить клавиши регулировки громкости для изменения громкости.

Это то, что xev возвращает для клавиш уменьшения громкости, громкости и громкости:

Уменьшение громкости:

FocusOut event, serial 33, synthetic NO, window 0x1a00001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 33, synthetic NO, window 0x1a00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 33, 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 
[d4 ] Volume Up:

FocusOut event, serial 33, synthetic NO, window 0x1a00001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 33, synthetic NO, window 0x1a00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 33, 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   

Отключение звука:

FocusOut event, serial 33, synthetic NO, window 0x1a00001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 33, synthetic NO, window 0x1a00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 33, 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 

Как вы можете видеть, все они одинаковы. Поэтому я не знаю, как единство или гном могут рассказать им обособленно. Только для справки я покажу вывод для микрофона и wifi с медиа-клавиш из xev:

KeyRelease event, serial 33, synthetic NO, window 0x1a00001,
    root 0xf6, subw 0x0, time 3107820, (-19,759), root:(625,798),
    state 0x0, keycode 198 (keysym 0x1008ffb2, XF86AudioMicMute), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1a00001,
    root 0xf6, subw 0x0, time 3112189, (-19,759), root:(625,798),
    state 0x0, keycode 246 (keysym 0x1008ff95, XF86WLAN), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

И я использовал аналогичные результаты для клавиш громкости перед установкой ubuntu () Я использовал Arch).

Ключи яркости тоже не работают, являются ли они переопределены на некотором низком уровне? Есть ли способ, которым я могу это исправить, чтобы они вернули правильное значение или есть какой-то другой способ заставить медиа-ключи работать для ubuntu?

Update: Это то, что xev дает для увеличения громкости и вниз, когда я запускаю единство.

FocusOut event, serial 47, synthetic NO, window 0x4800001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 47, synthetic NO, window 0x4800001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 47, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   4   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 47, synthetic NO, window 0x4800001,
    root 0xf7, subw 0x0, time 2182026, (-1217,972), root:(525,2104),
    state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 47, synthetic NO, window 0x4800001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 47, synthetic NO, window 0x4800001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 47, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   8   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 47, synthetic NO, window 0x4800001,
    root 0xf7, subw 0x0, time 2185429, (-1217,972), root:(525,2104),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

При запуске единицы у меня также есть unity-settings-daemon, unity-panel-service и unity-fallback-mount-helper. Может ли один из них поймать событие и добавить XF86 keysyms?

В ответ на @Adaephon у меня это в моей конфигурации i3:

# volume controls
bindsym XF86AudioRaiseVolume exec amixer -q  set Master playback 2%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q  set Master playback 2%- unmute
bindsym XF86AudioMute exec amixer -q set Master mute
1
задан 12 May 2016 в 02:28

0 ответов

Другие вопросы по тегам:

Похожие вопросы: