asus-linux-drivers / asus-wmi-hotkeys-driver

Linux configurable driver for Asus WMI hotkeys. The driver works as middle-man, is listening for key events from specific devices and when is appropriate key event caught then may be handle by own way configured in config file.
GNU General Public License v2.0
27 stars 5 forks source link

Armory Crate Button Problem #8

Closed Edward-EH-Holmes closed 11 months ago

Edward-EH-Holmes commented 11 months ago

Sorry to bother you, but what should I do if I need to use the Armory Crate button? My PC is a TUF Gaming Laptop F15 FX507VV.

ldrahnik commented 11 months ago

Hello there, what Is returned when you press the button (Fn + Armory Crate button) and this command is running: $ sudo evemu-record /dev/input/event4 (right ID in the end of command pick up for example from command$ libinput debug-eventsfor lineAsus WMI hotkeys:-event4 DEVICE_ADDED Asus WMI hotkeys seat0 default group9 cap:k`) and you will see something like:

$ sudo evemu-record /dev/input/event4
...
E: 0.000001 0004 0004 0107  # EV_MSC / MSC_SCAN             107
E: 0.000001 0001 00bf 0001  # EV_KEY / KEY_F21              1
E: 0.000001 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +0ms
E: 0.000024 0001 00bf 0000  # EV_KEY / KEY_F21              0
E: 0.000024 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +0ms
E: 2.476044 0004 0004 0124  # EV_MSC / MSC_SCAN             124
E: 2.476044 0001 00f8 0001  # EV_KEY / KEY_MICMUTE          1
E: 2.476044 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +2476ms
E: 2.476066 0001 00f8 0000  # EV_KEY / KEY_MICMUTE          0
E: 2.476066 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +0ms
E: 2.792149 0004 0004 0133  # EV_MSC / MSC_SCAN             133
E: 2.792149 0001 00d4 0001  # EV_KEY / KEY_CAMERA           1
E: 2.792149 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +316ms
E: 2.792178 0001 00d4 0000  # EV_KEY / KEY_CAMERA           0
E: 2.792178 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +0ms
SE: 5.003936 0004 0004 0134 # EV_MSC / MSC_SCAN             134
E: 5.003936 0001 0094 0001  # EV_KEY / KEY_PROG1            1
E: 5.003936 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +2211ms
E: 5.003972 0001 0094 0000  # EV_KEY / KEY_PROG1            0
E: 5.003972 0000 0000 0000  # ------------ SYN_REPORT (0) ---------- +0ms

and what about you take care of is EV_MSC / MSC_SCAN value which is then written as hexa value to my config aswell as appropriate key to which you want bind that, example:

KEY_WMI_TOUCHPAD = 0x6B # 107
KEY_WMI_MICMUTE = 0x7C # 124
KEY_WMI_CAMERA = 0x85 # 133
KEY_WMI_MYASUS = 0x86 # 134

key_wmi_touchpad = [
    KEY_WMI_TOUCHPAD,
    EV_KEY.KEY_TOUCHPAD_TOGGLE
]

key_wmi_camera = [
    KEY_WMI_CAMERA,
    EV_KEY.KEY_CAMERA
]

key_wmi_myasus = [
    KEY_WMI_MYASUS,
    EV_KEY.KEY_LEFTSHIFT,
    EV_KEY.KEY_LEFTMETA,
    EV_KEY.KEY_T,
]

keys_wmi = [
    key_wmi_camera,
    key_wmi_myasus,
    key_wmi_touchpad
]
ldrahnik commented 11 months ago

@Edward-EH-Holmes Please, let me know about MSC_SCAN Armory Crate button's value because could be mentioned to Readme.md.

ldrahnik commented 11 months ago

Can be reopened.