GuiGetInputMode

From Multi Theft Auto: Wiki
Revision as of 17:11, 11 November 2025 by Fernando187 (talk | contribs) (Move unnecessary note section to desc)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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. However:

  • when guiGetInputMode ( ) returns "allow_binds" you can be sure that guiGetInputEnabled () will return false
  • when guiGetInputMode ( ) returns "no_binds" you can be sure that guiGetInputEnabled () will return true

Syntax

string guiGetInputMode ( )

OOP Syntax Help! I don't understand this!

Method: GuiElement.getInputMode(...)
Variable: .inputMode
Counterpart: guiSetInputMode


Returns

Returns a string defining the current input mode, potential values are:

  • "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

Example

Click to collapse [-]
Client
addCommandHandler( "checkmode", 
function ()
    outputChatBox( string.format( "The current input mode is: '%s'", guiGetInputMode () ) )
end )

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI