mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 11:43:59 +01:00
Extend uw event catching (debug)
This commit is contained in:
parent
4a272bb715
commit
edb5c08ad3
|
@ -255,46 +255,50 @@ static void uniwill_wmi_handle_event(u32 value, void *context, u32 guid_nr)
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = (union acpi_object *) response.pointer;
|
obj = (union acpi_object *) response.pointer;
|
||||||
if (obj && obj->type == ACPI_TYPE_INTEGER) {
|
if (obj) {
|
||||||
code = obj->integer.value;
|
if (obj->type == ACPI_TYPE_INTEGER) {
|
||||||
if (!sparse_keymap_report_known_event(current_driver->input_device, code, 1, true)) {
|
code = obj->integer.value;
|
||||||
TUXEDO_DEBUG("[Ev %d] Unknown key - %d (%0#6x)\n", guid_nr, code, code);
|
if (!sparse_keymap_report_known_event(current_driver->input_device, code, 1, true)) {
|
||||||
}
|
TUXEDO_DEBUG("[Ev %d] Unknown key - %d (%0#6x)\n", guid_nr, code, code);
|
||||||
|
}
|
||||||
|
|
||||||
// Special key combination when mode change key is pressed
|
// Special key combination when mode change key is pressed
|
||||||
if (code == 0xb0) {
|
if (code == 0xb0) {
|
||||||
input_report_key(current_driver->input_device, KEY_LEFTMETA, 1);
|
input_report_key(current_driver->input_device, KEY_LEFTMETA, 1);
|
||||||
input_report_key(current_driver->input_device, KEY_LEFTALT, 1);
|
input_report_key(current_driver->input_device, KEY_LEFTALT, 1);
|
||||||
input_report_key(current_driver->input_device, KEY_F6, 1);
|
input_report_key(current_driver->input_device, KEY_F6, 1);
|
||||||
input_sync(current_driver->input_device);
|
input_sync(current_driver->input_device);
|
||||||
input_report_key(current_driver->input_device, KEY_F6, 0);
|
input_report_key(current_driver->input_device, KEY_F6, 0);
|
||||||
input_report_key(current_driver->input_device, KEY_LEFTALT, 0);
|
input_report_key(current_driver->input_device, KEY_LEFTALT, 0);
|
||||||
input_report_key(current_driver->input_device, KEY_LEFTMETA, 0);
|
input_report_key(current_driver->input_device, KEY_LEFTMETA, 0);
|
||||||
input_sync(current_driver->input_device);
|
input_sync(current_driver->input_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keyboard backlight brightness toggle
|
// Keyboard backlight brightness toggle
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 0x3b:
|
case 0x3b:
|
||||||
kbd_led_state_uw.brightness = 0x00;
|
kbd_led_state_uw.brightness = 0x00;
|
||||||
uniwill_write_kbd_bl_state();
|
uniwill_write_kbd_bl_state();
|
||||||
break;
|
break;
|
||||||
case 0x3c:
|
case 0x3c:
|
||||||
kbd_led_state_uw.brightness = 0x20;
|
kbd_led_state_uw.brightness = 0x20;
|
||||||
uniwill_write_kbd_bl_state();
|
uniwill_write_kbd_bl_state();
|
||||||
break;
|
break;
|
||||||
case 0x3d:
|
case 0x3d:
|
||||||
kbd_led_state_uw.brightness = 0x50;
|
kbd_led_state_uw.brightness = 0x50;
|
||||||
uniwill_write_kbd_bl_state();
|
uniwill_write_kbd_bl_state();
|
||||||
break;
|
break;
|
||||||
case 0x3e:
|
case 0x3e:
|
||||||
kbd_led_state_uw.brightness = 0x80;
|
kbd_led_state_uw.brightness = 0x80;
|
||||||
uniwill_write_kbd_bl_state();
|
uniwill_write_kbd_bl_state();
|
||||||
break;
|
break;
|
||||||
case 0x3f:
|
case 0x3f:
|
||||||
kbd_led_state_uw.brightness = 0xc8;
|
kbd_led_state_uw.brightness = 0xc8;
|
||||||
uniwill_write_kbd_bl_state();
|
uniwill_write_kbd_bl_state();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
TUXEDO_DEBUG("[Ev %d] Unknown event type - %d (%0#6x)\n", guid_nr, obj->type, obj->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue