The Lab
MISC native

DISPLAY_ONSCREEN_KEYBOARD

returns void8 paramsbuild 1207

Opens the on-screen keyboard with the title windowTitle, prefilled with defaultText, accepting up to maxInputLength characters.

Poll UPDATE_ONSCREEN_KEYBOARD, then read the text with GET_ONSCREEN_KEYBOARD_RESULT.

Signature

C
void DISPLAY_ONSCREEN_KEYBOARD(int textType, const char* windowTitle, const char* p2, const char* defaultText, const char* defaultConcat1, const char* defaultConcat2, const char* defaultConcat3, int maxInputLength); // 0x044131118D8DB3CD b1207

Parameters

#NameType
1textTypeint
2windowTitleconst char*
3p2const char*
4defaultTextconst char*
5defaultConcat1const char*
6defaultConcat2const char*
7defaultConcat3const char*
8maxInputLengthint

Facts

Facts about DISPLAY_ONSCREEN_KEYBOARD
Name
DISPLAY_ONSCREEN_KEYBOARD
Hash
0x044131118D8DB3CD
Namespace
Returns
void
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
Citizen.InvokeNative(0x044131118D8DB3CD, -- DISPLAY_ONSCREEN_KEYBOARD
  0, -- int textType
  "text", -- const char* windowTitle
  "text", -- const char* p2
  "text", -- const char* defaultText
  "text", -- const char* defaultConcat1
  "text", -- const char* defaultConcat2
  "text", -- const char* defaultConcat3
  0 -- int maxInputLength
)
JavaScript
Citizen.invokeNative("0x044131118D8DB3CD", // DISPLAY_ONSCREEN_KEYBOARD
  0, // int textType
  "text", // const char* windowTitle
  "text", // const char* p2
  "text", // const char* defaultText
  "text", // const char* defaultConcat1
  "text", // const char* defaultConcat2
  "text", // const char* defaultConcat3
  0 // int maxInputLength
);
C#
Function.Call((Hash)0x044131118D8DB3CD, // DISPLAY_ONSCREEN_KEYBOARD
  0, // int textType
  "text", // const char* windowTitle
  "text", // const char* p2
  "text", // const char* defaultText
  "text", // const char* defaultConcat1
  "text", // const char* defaultConcat2
  "text", // const char* defaultConcat3
  0 // int maxInputLength
);
All MISC natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.