mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] add quit keybind
This commit is contained in:
parent
b9cdaf8e19
commit
e3cbdd18a0
@ -46,6 +46,7 @@ Below are a list of current key bindings:
|
||||
| <kbd>ScrLk</kbd>+<kbd>F</kbd> | Full Screen toggle |
|
||||
| <kbd>ScrLk</kbd>+<kbd>I</kbd> | Spice keyboard & mouse enable toggle |
|
||||
| <kbd>ScrLk</kbd>+<kbd>N</kbd> | Toggle night vision mode (EGL renderer only!) |
|
||||
| <kbd>ScrLk</kbd>+<kbd>Q</kbd> | Quit |
|
||||
| <kbd>ScrLk</kbd>+<kbd>Insert</kbd> | Increase mouse sensitivity (in capture mode only) |
|
||||
| <kbd>ScrLk</kbd>+<kbd>Del</kbd> | Decrease mouse sensitivity (in capture mode only) |
|
||||
| <kbd>ScrLk</kbd>+<kbd>F1</kbd> | Send <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>F1</kbd> to the guest |
|
||||
|
@ -1082,6 +1082,11 @@ static void toggle_input(SDL_Scancode key, void * opaque)
|
||||
);
|
||||
}
|
||||
|
||||
static void quit(SDL_Scancode key, void * opaque)
|
||||
{
|
||||
state.running = false;
|
||||
}
|
||||
|
||||
static void mouse_sens_inc(SDL_Scancode key, void * opaque)
|
||||
{
|
||||
char * msg;
|
||||
@ -1130,6 +1135,7 @@ static void register_key_binds()
|
||||
{
|
||||
state.kbFS = app_register_keybind(SDL_SCANCODE_F , toggle_fullscreen, NULL);
|
||||
state.kbInput = app_register_keybind(SDL_SCANCODE_I , toggle_input , NULL);
|
||||
state.kbQuit = app_register_keybind(SDL_SCANCODE_Q , quit , NULL);
|
||||
state.kbMouseSensInc = app_register_keybind(SDL_SCANCODE_INSERT, mouse_sens_inc , NULL);
|
||||
state.kbMouseSensDec = app_register_keybind(SDL_SCANCODE_DELETE, mouse_sens_dec , NULL);
|
||||
|
||||
@ -1151,6 +1157,7 @@ static void release_key_binds()
|
||||
{
|
||||
app_release_keybind(&state.kbFS);
|
||||
app_release_keybind(&state.kbInput);
|
||||
app_release_keybind(&state.kbQuit);
|
||||
for(int i = 0; i < 12; ++i)
|
||||
app_release_keybind(&state.kbCtrlAltFn[i]);
|
||||
}
|
||||
|
@ -87,6 +87,7 @@ struct AppState
|
||||
|
||||
KeybindHandle kbFS;
|
||||
KeybindHandle kbInput;
|
||||
KeybindHandle kbQuit;
|
||||
KeybindHandle kbMouseSensInc;
|
||||
KeybindHandle kbMouseSensDec;
|
||||
KeybindHandle kbCtrlAltFn[12];
|
||||
|
Loading…
Reference in New Issue
Block a user