Top |
void | spice_inputs_motion () |
void | spice_inputs_position () |
void | spice_inputs_button_press () |
void | spice_inputs_button_release () |
void | spice_inputs_key_press () |
void | spice_inputs_key_press_and_release () |
void | spice_inputs_key_release () |
void | spice_inputs_set_key_locks () |
Spice supports sending keyboard key events and keyboard leds
synchronization. The key events are sent using
spice_inputs_key_press()
and spice_inputs_key_release()
using
a modified variant of PC XT scancodes.
Guest keyboard leds state can be manipulated with
spice_inputs_set_key_locks()
. When key lock change, a notification
is emitted with “inputs-modifiers” signal.
void spice_inputs_motion (SpiceInputsChannel *channel
,gint dx
,gint dy
,gint button_state
);
Change mouse position (used in SPICE_MOUSE_MODE_CLIENT).
void spice_inputs_position (SpiceInputsChannel *channel
,gint x
,gint y
,gint display
,gint button_state
);
Change mouse position (used in SPICE_MOUSE_MODE_CLIENT).
void spice_inputs_button_press (SpiceInputsChannel *channel
,gint button
,gint button_state
);
Press a mouse button.
void spice_inputs_button_release (SpiceInputsChannel *channel
,gint button
,gint button_state
);
Release a button.
void spice_inputs_key_press (SpiceInputsChannel *channel
,guint scancode
);
Press a key.
void spice_inputs_key_press_and_release (SpiceInputsChannel *channel
,guint scancode
);
Press and release a key event atomically (in the same message).
channel |
||
scancode |
a PC XT (set 1) key scancode. For scancodes with an |
Since: 0.13
void spice_inputs_key_release (SpiceInputsChannel *channel
,guint scancode
);
Release a key.
void spice_inputs_set_key_locks (SpiceInputsChannel *channel
,guint locks
);
Set the keyboard locks on the guest (Caps, Num, Scroll..)
struct SpiceInputsChannel;
The SpiceInputsChannel struct is opaque and should not be accessed directly.
struct SpiceInputsChannelClass { SpiceChannelClass parent_class; /* signals */ void (*inputs_modifiers)(SpiceChannel *channel); };
Class structure for SpiceInputsChannel.
“key-modifiers”
property“key-modifiers” gint
Guest keyboard lock/led state.
Flags: Read
Allowed values: >= 0
Default value: 0
“inputs-modifiers”
signalvoid user_function (SpiceInputsChannel *display, gpointer user_data)
The “inputs-modifiers” signal is emitted when the guest keyboard locks are changed. You can read the current state from “key-modifiers” property.
display |
the SpiceInputsChannel that emitted the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First