freesmartphone.org Input Interface
Description
The Input Interface provides information about the device’s buttons, switches, and similar peripheral entities.
Namespace
org.freesmartphone.Device.Input
Methods
Signals
Properties
None
Errors
None
Methods
GetId ( ) → s
Description: Get the identification of the input device.
Returns:
s: id The identification.
GetCapabilities ( ) → s
Description: Get the capabilities of the input device.
Returns:
s: id The capabilities. Valid elements are:
- “keys” ,
- “relative” ,
- “absolute” ,
- “misc” ,
- “switches” ,
- “leds” ,
- “sound” ,
- “force-feedback” .
Signals
Event ( ssi )
Description: Sent, when a button or switch input event occurs.
Parameters:
s: name The name of the event source.
s: action The action that triggered the event. Expected values are:
- “pressed”
- “held” (only for selected event sources)
- “released”
i: seconds The duration for the event. Only valid for the “held” and the “released” action.
DirectionalEvent ( sii )
Description: Sent, when a directional input event occurs.
Parameters:
s: name The name of the event source.
i: axis The axis on which the event happened.
i: offset The offset.