Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #11

Closed
wants to merge 3 commits into from
Closed

WIP #11

wants to merge 3 commits into from

Conversation

ldrahnik
Copy link
Member

@ldrahnik ldrahnik commented Jan 16, 2024

  • TODO: listen to multiple devices, how? (to test change Asus Keyboard to Asus WMI accel tablet mode)

Test layout

from libevdev import EV_KEY, EV_SW, InputEvent

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

KEY_WMI_NUMLOCK_DISABLE_KEYBOARD = EV_KEY.KEY_NUMLOCK

KEY_WMI_MICMUTE_LED = '/sys/class/leds/platform::micmute/brightness' # or 0x00040017
KEY_WMI_CAMERA_LED = 0x00060079

key_wmi_tablet_mode_disable_keyboard = [
    InputEvent(EV_SW.SW_TABLET_MODE, 1),
    'xinput disable 19'
]

key_wmi_tablet_mode_enable_keyboard = [
    InputEvent(EV_SW.SW_TABLET_MODE, 0),
    'xinput enable 19'
]

key_wmi_touchpad = [
    KEY_WMI_TOUCHPAD,
    EV_KEY.KEY_TOUCHPAD_TOGGLE
]

key_wmi_micmute = [
    KEY_WMI_MICMUTE,
    KEY_WMI_MICMUTE_LED
]

key_wmi_camera = [
    KEY_WMI_CAMERA,
    KEY_WMI_CAMERA_LED
]

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

keys_wmi = [
    key_wmi_touchpad,
    key_wmi_micmute,
    key_wmi_camera,
    key_wmi_myasus,
    key_wmi_tablet_mode_disable_keyboard,
    key_wmi_tablet_mode_enable_keyboard
]
  • TODO: x11 variant service?
$ cat /var/log/asus_wmi_hotkeys-driver/error.log 

Unable to connect to X server
Unable to connect to X server

@ldrahnik ldrahnik closed this Jan 16, 2024
@ldrahnik ldrahnik deleted the support-for-custom-commands-and-input-events branch January 16, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant