ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setMinimizeKeyEnabled

Function

setMinimizeKeyEnabled

ClientInput and controlsTrilogy Hub only

Turns minimising the game with the F11 key on or off. When it is off, F11 does not minimise the game but still works in bindKey, so the server can bind its own function to it (e.g. a custom map).

Syntax

bool setMinimizeKeyEnabled(bool enabled)

Arguments

enabledbool
false turns minimising off, true brings it back.

Returns

true after the change, false for a bad argument (with a console warning).

Example

F11 opens the server's own map instead of minimising the game.

setMinimizeKeyEnabled(false)

local mapOpen = false
bindKey("F11", "down", function()
    mapOpen = not mapOpen
    showCursor(mapOpen)
end)

Notes

Per resource. The setting lasts until the resource turns it back on or is stopped. F11 minimises the game again only when no resource has it turned off.

See also