How the (DisplayOnscreenKeyboard) command is used

I would like to use (DisplayOnscreenKeyboard) to replace the T key chat message. Because our country’s input method by T key will lead to the collapse of the game. So I want to use (DisplayOnscreenKeyboard) to send chat messages. I am writing at this time. But I found him having a problem. That is, these three orders are executed together. The resulting (GetOnscreenKeyboardResult) command is always null. (DisplayOnscreenKeyboard) command to execute and wait for the input to complete, and then execute (GetOnscreenKeyboardResult) command to get the input?

RegisterNetEvent("haha")
AddEventHandler("haha", function()
    --This line of command means to start the screen keyboard
	DisplayOnscreenKeyboard(true, "FMMC_KEY_TIP8", "", "", "", "", "", 64) 
    --The command for this line means that the global variable (we) is equal to the screen keyboard content
	we = GetOnscreenKeyboardResult()
	--This line of command means sending the message (we), that is, sending the message screen keyboard content
	TriggerEvent("chatMessage", '', {0,0,0}, we)
	end)

English is not very good basically through google translation, thank you for your help!:slight_smile:

What IME are you using that crashes the game when using the chat button? Have you posted a bug report about this?

If the default is Chinese input method. Pressing the T key will crash