From 2d3f22a579df37b9ff6832af866355e82465c690 Mon Sep 17 00:00:00 2001 From: Christoffer Sandberg Date: Thu, 18 Jun 2020 10:42:10 +0200 Subject: [PATCH] Move special code handling to where it is actually defined --- src/uniwill_keyboard.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/uniwill_keyboard.h b/src/uniwill_keyboard.h index 1b195a8..d3b8be6 100644 --- a/src/uniwill_keyboard.h +++ b/src/uniwill_keyboard.h @@ -115,18 +115,18 @@ static void uniwill_wmi_handle_event(u32 value, void *context, u32 guid_nr) 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 - if (code == 0xb0) { - 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_F6, 1); - input_sync(current_driver->input_device); - 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_LEFTMETA, 0); - input_sync(current_driver->input_device); + // Special key combination when mode change key is pressed + if (code == 0xb0) { + 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_F6, 1); + input_sync(current_driver->input_device); + 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_LEFTMETA, 0); + input_sync(current_driver->input_device); + } } kfree(obj);