mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 07:17:23 +00:00
[client] spice: add ability to set keyboard LED state in guest
FIXME: update PureSpice
This commit is contained in:
parent
0f6f89fa5b
commit
3a00277e93
@ -62,6 +62,7 @@ void app_handleKeyPress(int scancode);
|
|||||||
void app_handleKeyRelease(int scancode);
|
void app_handleKeyRelease(int scancode);
|
||||||
void app_handleKeyboardTyped(const char * typed);
|
void app_handleKeyboardTyped(const char * typed);
|
||||||
void app_handleKeyboardModifiers(bool ctrl, bool shift, bool alt, bool super);
|
void app_handleKeyboardModifiers(bool ctrl, bool shift, bool alt, bool super);
|
||||||
|
void app_handleKeyboardLEDs(bool numLock, bool capsLock, bool scrollLock);
|
||||||
void app_handleEnterEvent(bool entered);
|
void app_handleEnterEvent(bool entered);
|
||||||
void app_handleFocusEvent(bool focused);
|
void app_handleFocusEvent(bool focused);
|
||||||
void app_handleCloseEvent(void);
|
void app_handleCloseEvent(void);
|
||||||
|
@ -412,6 +412,17 @@ void app_handleKeyboardModifiers(bool ctrl, bool shift, bool alt, bool super)
|
|||||||
g_state.io->KeySuper = super;
|
g_state.io->KeySuper = super;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void app_handleKeyboardLEDs(bool numLock, bool capsLock, bool scrollLock)
|
||||||
|
{
|
||||||
|
uint32_t modifiers =
|
||||||
|
(scrollLock ? 1 /* SPICE_SCROLL_LOCK_MODIFIER */ : 0) |
|
||||||
|
(numLock ? 2 /* SPICE_NUM_LOCK_MODIFIER */ : 0) |
|
||||||
|
(capsLock ? 4 /* SPICE_CAPS_LOCK_MODIFIER */ : 0);
|
||||||
|
|
||||||
|
if (!spice_key_modifiers(modifiers))
|
||||||
|
DEBUG_ERROR("app_handleKeyboardLEDs: failed to send message");
|
||||||
|
}
|
||||||
|
|
||||||
void app_handleMouseRelative(double normx, double normy,
|
void app_handleMouseRelative(double normx, double normy,
|
||||||
double rawx, double rawy)
|
double rawx, double rawy)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user