• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient How to Toggle Chat on and Off with Enter Key in Otclient

CoolBuys1290

Member
Joined
Aug 23, 2018
Messages
80
Reaction score
8
How do I change Otclient to toggle chat on and off with the Enter key? I'm using Otclient 0.6.6 with Tibia version 7.72.

Thanks,

CoolBuys1290
 
Bump now with picture.Snip 2.PNGChecking the box enables wasd movement,but pressing Enter turns off the wasd movement which is what I don't want.Capture.PNG I want wasd mode to stay on and I want the Enter key to change chat mode on and off. Please help. Thanks.
 
 
I added
Lua:
function newToggle()
    if consoleToggleChat:isChecked() then
        consoleToggleChat:setChecked(false)
        enableChat()
    else
        consoleToggleChat:setChecked(true)
        disableChat()
    end
end

to console.lua,

and added
Lua:
g_keyboard.bindKeyUp('Enter', newToggle, consolePanel)

right under
Lua:
g_keyboard.bindKeyDown('Enter', sendCurrentMessage, consolePanel)

But when I press Enter key after being in chat, the checkbox doesn't reappear like it's supposed to. Please help me figure this out. Thanks.

Capture 3.PNG
 
Sorry I described the problem wrong above.

When I press the Enter key to enter chat mode, the cursor doesn't appear like it's supposed to, and doesn't let me chat.

The picture shows what I can't do:

Snip 2.PNG
Please help,
Thanks.
 
Back
Top