pcoip_key

Emulates a keystroke in a remote session .

C Language

int pcoip_key( const char* key, long int key_modifier );

ExampleTeradici PCoIP Protocol Functions

Arguments

NameComments
keyA character key or the name of a special key. See below: Special Keys.
key_modifierA key pressed together with the character or special key. Modifiers can be combined, for example, MODIF_SHIFT|MODIF_CONTROL. See below: Key Modifier Values

General Information

pcoip_key emulates a keystroke in a remote session.

Note: To set a delay after a keystroke event, select and configure the PCoIP runtime setting, Delay after keystroke and mouse click.

Special Keys

Key
Key code

  

LEFT_ARROW_KEY

  

UP_ARROW_KEY

  

RIGHT_ARROW_KEY

  

DOWN_ARROW_KEY
  +
ADD_KEY
  *
MULTIPLY_KEY
  -
SUBTRACT_KEY
  /
DIVIDE_KEY
Alt
ALT_KEY
Backspace
BACKSPACE_KEY
Caps Lock
CAPS_LOCK_KEY
Ctrl
CTRL_KEY
Delete
DELETE_KEY
End
END_KEY
Enter
ENTER_KEY
Esc
ESC_KEY
F1 - F12
F1_KEY - F12_KEY
Home
HOME_KEY
Insert
INSERT_KEY
Num Lock
NUM_LOCK_KEY
Page Down
PAGE_DOWN_KEY
Page Up
PAGE_UP_KEY
Pause
PAUSE_KEY
PrtScn
PRINT_SCREEN_KEY
ScrLk
SCROLL_LOCK_KEY
Shift
SHIFT_KEY
Tab
TAB_KEY

Key Modifier Values

Define value
Value
Description
NO_MODIF
0
No modifier key
MODIF_SHIFT
1
The Shift key
MODIF_CONTROL
2
The Ctrl key
MODIF_ALT
4
The Alt key

Return Values

E_OK 
E_ALREADY_CONNECTEDDo not call this function after the connection is established.
E_NOT_CONNECTEDAction cannot be performed. There is no connection to the remote server.
E_OUT_OF_TIMEFunction timed out.
E_ILLEGAL_PARAMETERIllegal parameter found.
E_INTERNALInternal error found.

Parameterization

Standard parameterization is not available for this function.

Example

These are examples of the use of pcoip_key.

	pcoip_key("NUM_LOCK_KEY", 0);

	pcoip_key("h", MODIF_SHIFT); // Capital H