VgaGames 3 - Network man-pages

[.. upper level ..]

VG3_nw_addkey()

Add a key to the network structure, defining it as a network-key.
SYNTAX
void VG3_nw_addkey(struct vg3_nwclient *nwclnt, int jid, int keyidx)

FUNCTION PARAMETERS
nwclnt Network-struct
jid Joystick-ID or 0 = keyboard
keyidx Key, button or axis:
- for keyboard: one of the values of VGAG3_KEYS
- for gamecontroller: one of the values of VGAG3_GCS
- for joystick: joystick-input-keynumber (starting from 1)

DESCRIPTION
Add a key to the network structure. This function has to be called for each key before calling VG3_nw_connect(). It is important that all clients add the same keys in the same order! Strokes of keys (of keyboard, gamecontroller or joystick) added to the network structure are sent to and received from each client. So only relevant keys should be added. These keys have to be checked with VG3_nw_key_ispressed() instead of VG3_key_ispressed() or VG3_gamecontroller_ispressed.

SEE ALSO
VG3_nw_haskey() VG3_nw_changekey()