OnDgsKey

From Multi Theft Auto: Wiki
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