SpiceClientGLib.InputsChannel

g GObject.Object GObject.Object SpiceClientGLib.Channel SpiceClientGLib.Channel GObject.Object->SpiceClientGLib.Channel SpiceClientGLib.InputsChannel SpiceClientGLib.InputsChannel SpiceClientGLib.Channel->SpiceClientGLib.InputsChannel

Subclasses:

None

Methods

Inherited:

SpiceClientGLib.Channel (13), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

button_press (button, button_state)

button_release (button, button_state)

key_press (scancode)

key_press_and_release (scancode)

key_release (scancode)

motion (dx, dy, button_state)

position (x, y, display, button_state)

set_key_locks (locks)

Virtual Methods

Inherited:

SpiceClientGLib.Channel (8), GObject.Object (7)

Properties

Inherited:

SpiceClientGLib.Channel (5)

Name

Type

Flags

Short Description

key-modifiers

int

r

Guest keyboard lock/led state

Signals

Inherited:

SpiceClientGLib.Channel (2), GObject.Object (1)

Name

Short Description

inputs-modifiers

The SpiceClientGLib.InputsChannel ::inputs-modifiers signal is emitted when the guest keyboard locks are changed.

Fields

Inherited:

SpiceClientGLib.Channel (2), GObject.Object (1)

Name

Type

Access

Description

parent

SpiceClientGLib.Channel

r

Class Details

class SpiceClientGLib.InputsChannel(**kwargs)
Bases:

SpiceClientGLib.Channel

Abstract:

No

Structure:

SpiceClientGLib.InputsChannelClass

The SpiceClientGLib.InputsChannel struct is opaque and should not be accessed directly.

button_press(button, button_state)
Parameters:
  • button (int) – a SPICE_MOUSE_BUTTON

  • button_state (int) – SPICE_MOUSE_BUTTON_MASK flags

Press a mouse button.

New in version 0.35.

button_release(button, button_state)
Parameters:
  • button (int) – a SPICE_MOUSE_BUTTON

  • button_state (int) – SPICE_MOUSE_BUTTON_MASK flags

Release a button.

New in version 0.35.

key_press(scancode)
Parameters:

scancode (int) – a PC XT (set 1) key scancode. For scancodes with an \%0xe0 prefix, drop the prefix and OR the scancode with \%0x100.

Press a key.

New in version 0.35.

key_press_and_release(scancode)
Parameters:

scancode (int) – a PC XT (set 1) key scancode. For scancodes with an \%0xe0 prefix, drop the prefix and OR the scancode with \%0x100.

Press and release a key event atomically (in the same message).

New in version 0.35.

key_release(scancode)
Parameters:

scancode (int) – a PC XT (set 1) key scancode. For scancodes with an \%0xe0 prefix, drop the prefix and OR the scancode with \%0x100.

Release a key.

New in version 0.35.

motion(dx, dy, button_state)
Parameters:
  • dx (int) – delta X mouse coordinates

  • dy (int) – delta Y mouse coordinates

  • button_state (int) – SPICE_MOUSE_BUTTON_MASK flags

Change mouse position (used in SPICE_MOUSE_MODE_SERVER).

New in version 0.35.

position(x, y, display, button_state)
Parameters:
  • x (int) – X mouse coordinates

  • y (int) – Y mouse coordinates

  • display (int) – display channel id

  • button_state (int) – SPICE_MOUSE_BUTTON_MASK flags

Change mouse position (used in SPICE_MOUSE_MODE_CLIENT).

New in version 0.35.

set_key_locks(locks)
Parameters:

locks (int) – SpiceClientGLib.InputsLock modifiers flags

Set the keyboard locks on the guest (Caps, Num, Scroll..)

New in version 0.35.

Signal Details

SpiceClientGLib.InputsChannel.signals.inputs_modifiers(inputs_channel)
Signal Name:

inputs-modifiers

Flags:

RUN_FIRST

Parameters:

inputs_channel (SpiceClientGLib.InputsChannel) – The object which received the signal

The SpiceClientGLib.InputsChannel ::inputs-modifiers signal is emitted when the guest keyboard locks are changed. You can read the current state from SpiceClientGLib.InputsChannel :key-modifiers property.

Property Details

SpiceClientGLib.InputsChannel.props.key_modifiers
Name:

key-modifiers

Type:

int

Default Value:

0

Flags:

READABLE

Guest keyboard lock/led state