mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 06:11:46 +00:00
[client] add keybind <ScrollLock+R> to rotate the display at runtime
This commit is contained in:
parent
0451ec237e
commit
083deff489
2 changed files with 11 additions and 0 deletions
|
@ -1630,6 +1630,15 @@ static void toggle_video(uint32_t scancode, void * opaque)
|
|||
}
|
||||
}
|
||||
|
||||
static void toggle_rotate(uint32_t scancode, void * opaque)
|
||||
{
|
||||
if (params.winRotate == LG_ROTATE_MAX-1)
|
||||
params.winRotate = 0;
|
||||
else
|
||||
++params.winRotate;
|
||||
updatePositionInfo();
|
||||
}
|
||||
|
||||
static void toggle_input(uint32_t scancode, void * opaque)
|
||||
{
|
||||
g_state.ignoreInput = !g_state.ignoreInput;
|
||||
|
@ -1698,6 +1707,7 @@ static void register_key_binds(void)
|
|||
{
|
||||
g_state.kbFS = app_register_keybind(KEY_F , toggle_fullscreen, NULL);
|
||||
g_state.kbVideo = app_register_keybind(KEY_V , toggle_video , NULL);
|
||||
g_state.kbRotate = app_register_keybind(KEY_R , toggle_rotate , NULL);
|
||||
g_state.kbInput = app_register_keybind(KEY_I , toggle_input , NULL);
|
||||
g_state.kbQuit = app_register_keybind(KEY_Q , quit , NULL);
|
||||
g_state.kbMouseSensInc = app_register_keybind(KEY_INSERT, mouse_sens_inc , NULL);
|
||||
|
|
|
@ -90,6 +90,7 @@ struct AppState
|
|||
|
||||
KeybindHandle kbFS;
|
||||
KeybindHandle kbVideo;
|
||||
KeybindHandle kbRotate;
|
||||
KeybindHandle kbInput;
|
||||
KeybindHandle kbQuit;
|
||||
KeybindHandle kbMouseSensInc;
|
||||
|
|
Loading…
Reference in a new issue