|
def | __init__ (self, code=0, repeat=1, down=1, queue=0, map_name="", button_name="", amount=0, axis=0) |
|
def | __init__ (self) |
|
def | append_payload (self, blob) |
|
def | set_payload (self, payload) |
|
def | num_packets (self) |
|
def | get_header (self, packettype=-1, seq=1, maxseq=1, payload_size=0) |
|
def | get_payload_size (self, seq) |
|
def | get_udp_message (self, packetnum=1) |
|
def | send (self, sock, addr, uid=UNIQUE_IDENTIFICATION) |
|
A BUTTON packet
A button packet send a key press or release event to XBMC
def python.xbmcclient.PacketBUTTON.__init__ |
( |
|
self, |
|
|
|
code = 0 , |
|
|
|
repeat = 1 , |
|
|
|
down = 1 , |
|
|
|
queue = 0 , |
|
|
|
map_name = "" , |
|
|
|
button_name = "" , |
|
|
|
amount = 0 , |
|
|
|
axis = 0 |
|
) |
| |
Keyword arguments:
code -- raw button code (default: 0)
repeat -- this key press should repeat until released (default: 1)
Note that queued pressed cannot repeat.
down -- if this is 1, it implies a press event, 0 implies a release
event. (default: 1)
queue -- a queued key press means that the button event is
executed just once after which the next key press is
processed. It can be used for macros. Currently there
is no support for time delays between queued presses.
(default: 0)
map_name -- a combination of map_name and button_name refers to a
mapping in the user's Keymap.xml or Lircmap.xml.
map_name can be one of the following:
"KB" => standard keyboard map ( <keyboard> section )
"XG" => xbox gamepad map ( <gamepad> section )
"R1" => xbox remote map ( <remote> section )
"R2" => xbox universal remote map ( <universalremote>
section )
"LI:devicename" => LIRC remote map where 'devicename' is the
actual device's name
button_name -- a button name defined in the map specified in map_name.
For example, if map_name is "KB" referring to the
<keyboard> section in Keymap.xml then, valid
button_names include "printscreen", "minus", "x", etc.
amount -- unimplemented for now; in the future it will be used for
specifying magnitude of analog key press events