Input: allocate keycode for Display refresh rate toggle
authorGergo Koteles <soyer@irl.hu>
Sun, 10 Mar 2024 11:31:41 +0000 (12:31 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 12 Mar 2024 10:43:53 +0000 (12:43 +0200)
Newer Lenovo Yogas and Legions with 60Hz/90Hz displays send a wmi event
when Fn + R is pressed. This is intended for use to switch between the
two refresh rates.

Allocate a new KEY_REFRESH_RATE_TOGGLE keycode for it.

Signed-off-by: Gergo Koteles <soyer@irl.hu>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/15a5d08c84cf4d7b820de34ebbcf8ae2502fb3ca.1710065750.git.soyer@irl.hu
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
include/uapi/linux/input-event-codes.h

index 022a520e31fc23abdb9dbfdcfa06edc0b692a1be..03edf2ccdf6c80c52eca377c3f4066819e88555f 100644 (file)
 
 #define KEY_ALS_TOGGLE         0x230   /* Ambient light sensor */
 #define KEY_ROTATE_LOCK_TOGGLE 0x231   /* Display rotation lock */
+#define KEY_REFRESH_RATE_TOGGLE        0x232   /* Display refresh rate toggle */
 
 #define KEY_BUTTONCONFIG               0x240   /* AL Button Configuration */
 #define KEY_TASKMANAGER                0x241   /* AL Task/Project Manager */