Keyboard#

Enums

enum sfKeyCode#

Key codes.

Values:

enumerator sfKeyUnknown#

Unhandled key.

enumerator sfKeyA#

The A key.

enumerator sfKeyB#

The B key.

enumerator sfKeyC#

The C key.

enumerator sfKeyD#

The D key.

enumerator sfKeyE#

The E key.

enumerator sfKeyF#

The F key.

enumerator sfKeyG#

The G key.

enumerator sfKeyH#

The H key.

enumerator sfKeyI#

The I key.

enumerator sfKeyJ#

The J key.

enumerator sfKeyK#

The K key.

enumerator sfKeyL#

The L key.

enumerator sfKeyM#

The M key.

enumerator sfKeyN#

The N key.

enumerator sfKeyO#

The O key.

enumerator sfKeyP#

The P key.

enumerator sfKeyQ#

The Q key.

enumerator sfKeyR#

The R key.

enumerator sfKeyS#

The S key.

enumerator sfKeyT#

The T key.

enumerator sfKeyU#

The U key.

enumerator sfKeyV#

The V key.

enumerator sfKeyW#

The W key.

enumerator sfKeyX#

The X key.

enumerator sfKeyY#

The Y key.

enumerator sfKeyZ#

The Z key.

enumerator sfKeyNum0#

The 0 key.

enumerator sfKeyNum1#

The 1 key.

enumerator sfKeyNum2#

The 2 key.

enumerator sfKeyNum3#

The 3 key.

enumerator sfKeyNum4#

The 4 key.

enumerator sfKeyNum5#

The 5 key.

enumerator sfKeyNum6#

The 6 key.

enumerator sfKeyNum7#

The 7 key.

enumerator sfKeyNum8#

The 8 key.

enumerator sfKeyNum9#

The 9 key.

enumerator sfKeyEscape#

The Escape key.

enumerator sfKeyLControl#

The left Control key.

enumerator sfKeyLShift#

The left Shift key.

enumerator sfKeyLAlt#

The left Alt key.

enumerator sfKeyLSystem#

The left OS specific key: window (Windows and Linux), apple (MacOS X), …

enumerator sfKeyRControl#

The right Control key.

enumerator sfKeyRShift#

The right Shift key.

enumerator sfKeyRAlt#

The right Alt key.

enumerator sfKeyRSystem#

The right OS specific key: window (Windows and Linux), apple (MacOS X), …

enumerator sfKeyMenu#

The Menu key.

enumerator sfKeyLBracket#

The [ key.

enumerator sfKeyRBracket#

The ] key.

enumerator sfKeySemicolon#

The ; key.

enumerator sfKeyComma#

The , key.

enumerator sfKeyPeriod#

The . key.

enumerator sfKeyQuote#

The ‘ key.

enumerator sfKeySlash#

The / key.

enumerator sfKeyBackslash#

The \ key.

enumerator sfKeyTilde#

The ~ key.

enumerator sfKeyEqual#

The = key.

enumerator sfKeyHyphen#

The - key (hyphen)

enumerator sfKeySpace#

The Space key.

enumerator sfKeyEnter#

The Enter/Return key.

enumerator sfKeyBackspace#

The Backspace key.

enumerator sfKeyTab#

The Tabulation key.

enumerator sfKeyPageUp#

The Page up key.

enumerator sfKeyPageDown#

The Page down key.

enumerator sfKeyEnd#

The End key.

enumerator sfKeyHome#

The Home key.

enumerator sfKeyInsert#

The Insert key.

enumerator sfKeyDelete#

The Delete key.

enumerator sfKeyAdd#

The + key.

enumerator sfKeySubtract#

The - key (minus, usually from numpad)

enumerator sfKeyMultiply#

The * key.

enumerator sfKeyDivide#

The / key.

enumerator sfKeyLeft#

Left arrow.

enumerator sfKeyRight#

Right arrow.

enumerator sfKeyUp#

Up arrow.

enumerator sfKeyDown#

Down arrow.

enumerator sfKeyNumpad0#

The numpad 0 key.

enumerator sfKeyNumpad1#

The numpad 1 key.

enumerator sfKeyNumpad2#

The numpad 2 key.

enumerator sfKeyNumpad3#

The numpad 3 key.

enumerator sfKeyNumpad4#

The numpad 4 key.

enumerator sfKeyNumpad5#

The numpad 5 key.

enumerator sfKeyNumpad6#

The numpad 6 key.

enumerator sfKeyNumpad7#

The numpad 7 key.

enumerator sfKeyNumpad8#

The numpad 8 key.

enumerator sfKeyNumpad9#

The numpad 9 key.

enumerator sfKeyF1#

The F1 key.

enumerator sfKeyF2#

The F2 key.

enumerator sfKeyF3#

The F3 key.

enumerator sfKeyF4#

The F4 key.

enumerator sfKeyF5#

The F5 key.

enumerator sfKeyF6#

The F6 key.

enumerator sfKeyF7#

The F7 key.

enumerator sfKeyF8#

The F8 key.

enumerator sfKeyF9#

The F8 key.

enumerator sfKeyF10#

The F10 key.

enumerator sfKeyF11#

The F11 key.

enumerator sfKeyF12#

The F12 key.

enumerator sfKeyF13#

The F13 key.

enumerator sfKeyF14#

The F14 key.

enumerator sfKeyF15#

The F15 key.

enumerator sfKeyPause#

The Pause key.

enumerator sfKeyCount#

Keep last — the total number of keyboard keys.

enumerator sfKeyDash#

Deprecated:

Use Hyphen instead

enumerator sfKeyBack#

Deprecated:

Use Backspace instead

enumerator sfKeyBackSlash#

Deprecated:

Use Backslash instead

enumerator sfKeySemiColon#

Deprecated:

Use Semicolon instead

enumerator sfKeyReturn#

Deprecated:

Use Enter instead

Functions

sfBool sfKeyboard_isKeyPressed(sfKeyCode key)#

Check if a key is pressed.

Parameters:
  • key – Key to check

Returns:

sfTrue if the key is pressed, sfFalse otherwise

void sfKeyboard_setVirtualKeyboardVisible(sfBool visible)#

Show or hide the virtual keyboard.

Warning: the virtual keyboard is not supported on all systems. It will typically be implemented on mobile OSes (Android, iOS) but not on desktop OSes (Windows, Linux, …).

If the virtual keyboard is not available, this function does nothing.

Parameters:
  • visible – True to show, false to hide