guiGetInputMode | Multi Theft Auto: Wiki Skip to content

guiGetInputMode

Client-side
Server-side
Shared

Pair: guiSetInputMode

This function returns the current input mode as set by guiSetInputMode. Default mode is allow_binds.

Note

This function is not a replacement of guiGetInputEnabled, indeed for the mode no_binds_when_editing the actual state of binds depends on the currently focused GUI widget.

OOP Syntax Help! I don't understand this!

  • Method:GuiElement.getInputMode(...)
  • Variable: .inputMode

Syntax

string guiGetInputMode ( )

Returns

Returns a string defining the current input mode.

  • string: input mode
    • allow_binds: Binds are enabled, hence using a key such as t in an editbox will still activate the chatbox.
    • no_binds: Binds are disabled, hence using a key such as t in an editbox will not activate the chatbox.
    • no_binds_when_editing: Binds are always enabled except when an editable editbox or memo has input focus.

Code Examples

client
addCommandHandler("checkmode", function()
outputChatBox(string.format("The current input mode is: '%s'", guiGetInputMode()))
end)

See Also

GUI Functions