Learn how to evaluate and integrate the VNC SDK

We're here if you need help.

Keyboard.h

For a Viewer, convert keyboard input to platform-independent symbols. (more...)

Non-character keys on the main part of the keyboard

Modifier and Type Name and Description
#define

XK_BackSpace

Back space, back char.

#define XK_Tab
#define

XK_Return

Return, enter.

#define

XK_Pause

Pause, hold.

#define XK_Scroll_Lock
#define XK_Sys_Req
#define XK_Escape
#define

XK_Delete

Delete, rubout.

#define XK_Home
#define

XK_Left

Move left, left arrow.

#define

XK_Up

Move up, up arrow.

#define

XK_Right

Move right, right arrow.

#define

XK_Down

Move down, down arrow.

#define XK_Page_Up
#define XK_Page_Down
#define XK_End
#define XK_Print
#define

XK_Insert

Insert, insert here.

#define XK_Menu
#define XK_Break

Keys on the numeric keypad

Modifier and Type Name and Description
#define

XK_KP_Enter

Enter.

#define XK_KP_Home
#define XK_KP_Left
#define XK_KP_Up
#define XK_KP_Right
#define XK_KP_Down
#define XK_KP_Page_Up
#define XK_KP_Page_Down
#define XK_KP_End
#define XK_KP_Insert
#define XK_KP_Delete
#define XK_KP_Multiply
#define XK_KP_Add
#define

XK_KP_Separator

Separator, often comma.

#define XK_KP_Subtract
#define XK_KP_Decimal
#define XK_KP_Divide
#define XK_KP_0
#define XK_KP_1
#define XK_KP_2
#define XK_KP_3
#define XK_KP_4
#define XK_KP_5
#define XK_KP_6
#define XK_KP_7
#define XK_KP_8
#define XK_KP_9

Function keys

Modifier and Type Name and Description
#define XK_F1
#define XK_F2
#define XK_F3
#define XK_F4
#define XK_F5
#define XK_F6
#define XK_F7
#define XK_F8
#define XK_F9
#define XK_F10
#define XK_F11
#define XK_F12

Modifier keys

Modifier and Type Name and Description
#define

XK_Shift_L

Left shift.

#define

XK_Shift_R

Right shift.

#define

XK_Control_L

Left control.

#define

XK_Control_R

Right control.

#define

XK_Alt_L

Left alt / Mac Command.

#define

XK_Alt_R

Right alt.

#define

XK_Super_L

Left Windows key.

#define

XK_Super_R

Right Windows key.

#define

XK_ISO_Level3_Shift

AltGr / Mac Option(Alt)

Functions

Modifier and Type Name and Description
function vnc_uint31_t

vnc_unicodeToKeysym(vnc_uint31_t unicodeChar)

Converts a unicode character to a keysym, suitable for passing to vnc_Viewer_sendKeyDown().

Detailed description

For a Viewer, convert keyboard input to platform-independent symbols.

Keyboard keys are represented by keysyms, as used in the X Window System. This file provides the vnc_unicodeToKeysym() function to convert unicode characters to keysyms, as well as defining macros for most common non-character keysyms. For further information on keysyms, see http://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#keysym_encoding

Non-character keys on the main part of the keyboard

XK_BackSpace

Back space, back char.

XK_Tab
XK_Return

Return, enter.

XK_Pause

Pause, hold.

XK_Scroll_Lock
XK_Sys_Req
XK_Escape
XK_Delete

Delete, rubout.

XK_Home
XK_Left

Move left, left arrow.

XK_Up

Move up, up arrow.

XK_Right

Move right, right arrow.

XK_Down

Move down, down arrow.

XK_Page_Up
XK_Page_Down
XK_End
XK_Print
XK_Insert

Insert, insert here.

XK_Menu
XK_Break

Keys on the numeric keypad

XK_KP_Enter

Enter.

XK_KP_Home
XK_KP_Left
XK_KP_Up
XK_KP_Right
XK_KP_Down
XK_KP_Page_Up
XK_KP_Page_Down
XK_KP_End
XK_KP_Insert
XK_KP_Delete
XK_KP_Multiply
XK_KP_Add
XK_KP_Separator

Separator, often comma.

XK_KP_Subtract
XK_KP_Decimal
XK_KP_Divide
XK_KP_0
XK_KP_1
XK_KP_2
XK_KP_3
XK_KP_4
XK_KP_5
XK_KP_6
XK_KP_7
XK_KP_8
XK_KP_9

Function keys

XK_F1
XK_F2
XK_F3
XK_F4
XK_F5
XK_F6
XK_F7
XK_F8
XK_F9
XK_F10
XK_F11
XK_F12

Modifier keys

XK_Shift_L

Left shift.

XK_Shift_R

Right shift.

XK_Control_L

Left control.

XK_Control_R

Right control.

XK_Alt_L

Left alt / Mac Command.

XK_Alt_R

Right alt.

XK_Super_L

Left Windows key.

XK_Super_R

Right Windows key.

XK_ISO_Level3_Shift

AltGr / Mac Option(Alt)

Functions

vnc_uint31_t vnc_unicodeToKeysym(vnc_uint31_t unicodeChar)

Converts a unicode character to a keysym, suitable for passing to vnc_Viewer_sendKeyDown().

Return
The keysym value corresponding to unicodeChar, or zero if not recognized.
Parameters
  • unicodeChar -

    The unicode character.

×