OnDgsKey

From Multi Theft Auto: Wiki
Revision as of 12:32, 13 January 2023 by Thisdp (talk | contribs) (Created page with "{{Client event}} __NOTOC__ This event will be triggered when any key is pressed with a DGS element focused. ==Parameters== * '''button''': This refers the button pressed. See key names for a list of keys. * '''pressOrRelease''': This refers to whether they were pressing or releasing the key, ''true'' when pressing, ''false'' when releasing. ==Source== The source of this event is the DGS element which is focused. ==Example== <syntax...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This event will be triggered when any key is pressed with a DGS element focused.

Parameters

  • button: This refers the button pressed. See key names for a list of keys.
  • pressOrRelease: This refers to whether they were pressing or releasing the key, true when pressing, false when releasing.

Source

The source of this event is the DGS element which is focused.

Example

local edit = dgsCreateEdit(200,200,400,50,"test",false)
addEventHandler("onDgsKey",edit,function(button,state)
	outputChatBox(button..":"..(state and "pressed" or "released"))
end,false)

See Also

DGS events

General

Check Box

Combo Box

Drag'N Drop

Edit

Grid List

Menu

Selector

Mouse

Radio Button

Switch Button

Tab

Animation

Plugin

Media

Color Picker

QRCode

Remote Image

Client event functions