• 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 Is it possible to open an OTC mod by hotkey

sabodden

Member
Joined
Sep 27, 2019
Messages
138
Reaction score
18
Is it possible to open a mod by press shitf+f10 for example, instead of click in the icon?

firstmod.lua
Code:
mainWindow = nil
mainButton = nil


function init()
    mainWindow = g_ui.displayUI('main.otui')
    mainWindow:hide()
    mainButton = modules.client_topmenu.addRightToggleButton('firstmod_button', tr('firstmod OTC'), 'data/imgs/firstmod_icon.png', onoff, true)
end


function terminate()
    mainWindow:hide()
end

function onoff()
    if mainWindow:isVisible() then
        mainWindow:hide()
    else
        mainWindow:show()
    end
end
 
Solution
A
Code:
g_keyboard.bindKeyDown('Shift+F10, toggle)

Not 100% sure that is fully working with that combination but with other one it does.
Back
Top