@GlobalScope

Global scope constants and functions.

Description

A list of global scope enumerated constants and built-in functions. This is all that resides in the globals, constants regarding error codes, keycodes, property hints, etc.

Singletons are also documented here, since they can be accessed from anywhere.

For the entries related to GDScript which can be accessed in any script see @GDScript.

Tutorials

Properties

AudioServer

AudioServer

CameraServer

CameraServer

ClassDB

ClassDB

DisplayServer

DisplayServer

Engine

Engine

EngineDebugger

EngineDebugger

Geometry2D

Geometry2D

Geometry3D

Geometry3D

GodotSharp

GodotSharp

IP

IP

Input

Input

InputMap

InputMap

JavaClassWrapper

JavaClassWrapper

JavaScriptBridge

JavaScriptBridge

Marshalls

Marshalls

NativeExtensionManager

NativeExtensionManager

NavigationMeshGenerator

NavigationMeshGenerator

NavigationServer2D

NavigationServer2D

NavigationServer3D

NavigationServer3D

OS

OS

Performance

Performance

PhysicsServer2D

PhysicsServer2D

PhysicsServer2DManager

PhysicsServer2DManager

PhysicsServer3D

PhysicsServer3D

PhysicsServer3DManager

PhysicsServer3DManager

ProjectSettings

ProjectSettings

RenderingServer

RenderingServer

ResourceLoader

ResourceLoader

ResourceSaver

ResourceSaver

ResourceUID

ResourceUID

TextServerManager

TextServerManager

ThemeDB

ThemeDB

Time

Time

TranslationServer

TranslationServer

WorkerThreadPool

WorkerThreadPool

XRServer

XRServer

Methods

Variant

abs ( Variant x )

float

absf ( float x )

int

absi ( int x )

float

acos ( float x )

float

asin ( float x )

float

atan ( float x )

float

atan2 ( float y, float x )

float

bezier_interpolate ( float start, float control_1, float control_2, float end, float t )

Variant

bytes_to_var ( PackedByteArray bytes )

Variant

bytes_to_var_with_objects ( PackedByteArray bytes )

Variant

ceil ( Variant x )

float

ceilf ( float x )

int

ceili ( float x )

Variant

clamp ( Variant value, Variant min, Variant max )

float

clampf ( float value, float min, float max )

int

clampi ( int value, int min, int max )

float

cos ( float angle_rad )

float

cosh ( float x )

float

cubic_interpolate ( float from, float to, float pre, float post, float weight )

float

cubic_interpolate_angle ( float from, float to, float pre, float post, float weight )

float

cubic_interpolate_angle_in_time ( float from, float to, float pre, float post, float weight, float to_t, float pre_t, float post_t )

float

cubic_interpolate_in_time ( float from, float to, float pre, float post, float weight, float to_t, float pre_t, float post_t )

float

db_to_linear ( float db )

float

deg_to_rad ( float deg )

float

ease ( float x, float curve )

String

error_string ( int error )

float

exp ( float x )

Variant

floor ( Variant x )

float

floorf ( float x )

int

floori ( float x )

float

fmod ( float x, float y )

float

fposmod ( float x, float y )

int

hash ( Variant variable )

Object

instance_from_id ( int instance_id )

float

inverse_lerp ( float from, float to, float weight )

bool

is_equal_approx ( float a, float b )

bool

is_inf ( float x )

bool

is_instance_id_valid ( int id )

bool

is_instance_valid ( Variant instance )

bool

is_nan ( float x )

bool

is_zero_approx ( float x )

Variant

lerp ( Variant from, Variant to, Variant weight )

float

lerp_angle ( float from, float to, float weight )

float

lerpf ( float from, float to, float weight )

float

linear_to_db ( float lin )

float

log ( float x )

Variant

max ( ... ) vararg

float

maxf ( float a, float b )

int

maxi ( int a, int b )

Variant

min ( ... ) vararg

float

minf ( float a, float b )

int

mini ( int a, int b )

float

move_toward ( float from, float to, float delta )

int

nearest_po2 ( int value )

float

pingpong ( float value, float length )

int

posmod ( int x, int y )

float

pow ( float base, float exp )

void

print ( ... ) vararg

void

print_rich ( ... ) vararg

void

print_verbose ( ... ) vararg

void

printerr ( ... ) vararg

void

printraw ( ... ) vararg

void

prints ( ... ) vararg

void

printt ( ... ) vararg

void

push_error ( ... ) vararg

void

push_warning ( ... ) vararg

float

rad_to_deg ( float rad )

PackedInt64Array

rand_from_seed ( int seed )

float

randf ( )

float

randf_range ( float from, float to )

float

randfn ( float mean, float deviation )

int

randi ( )

int

randi_range ( int from, int to )

void

randomize ( )

float

remap ( float value, float istart, float istop, float ostart, float ostop )

int

rid_allocate_id ( )

RID

rid_from_int64 ( int base )

Variant

round ( Variant x )

float

roundf ( float x )

int

roundi ( float x )

void

seed ( int base )

Variant

sign ( Variant x )

float

signf ( float x )

int

signi ( int x )

float

sin ( float angle_rad )

float

sinh ( float x )

float

smoothstep ( float from, float to, float x )

float

snapped ( float x, float step )

float

sqrt ( float x )

int

step_decimals ( float x )

String

str ( ... ) vararg

Variant

str_to_var ( String string )

float

tan ( float angle_rad )

float

tanh ( float x )

int

typeof ( Variant variable )

PackedByteArray

var_to_bytes ( Variant variable )

PackedByteArray

var_to_bytes_with_objects ( Variant variable )

String

var_to_str ( Variant variable )

Variant

weakref ( Variant obj )

Variant

wrap ( Variant value, Variant min, Variant max )

float

wrapf ( float value, float min, float max )

int

wrapi ( int value, int min, int max )

Enumerations

enum Side:

  • SIDE_LEFT = 0 --- Left side, usually used for Control or StyleBox-derived classes.

  • SIDE_TOP = 1 --- Top side, usually used for Control or StyleBox-derived classes.

  • SIDE_RIGHT = 2 --- Right side, usually used for Control or StyleBox-derived classes.

  • SIDE_BOTTOM = 3 --- Bottom side, usually used for Control or StyleBox-derived classes.


enum Corner:

  • CORNER_TOP_LEFT = 0 --- Top-left corner.

  • CORNER_TOP_RIGHT = 1 --- Top-right corner.

  • CORNER_BOTTOM_RIGHT = 2 --- Bottom-right corner.

  • CORNER_BOTTOM_LEFT = 3 --- Bottom-left corner.


enum Orientation:


enum ClockDirection:

  • CLOCKWISE = 0

  • COUNTERCLOCKWISE = 1


enum HorizontalAlignment:

  • HORIZONTAL_ALIGNMENT_LEFT = 0 --- Horizontal left alignment, usually for text-derived classes.

  • HORIZONTAL_ALIGNMENT_CENTER = 1 --- Horizontal center alignment, usually for text-derived classes.

  • HORIZONTAL_ALIGNMENT_RIGHT = 2 --- Horizontal right alignment, usually for text-derived classes.

  • HORIZONTAL_ALIGNMENT_FILL = 3 --- Expand row to fit width, usually for text-derived classes.


enum VerticalAlignment:

  • VERTICAL_ALIGNMENT_TOP = 0 --- Vertical top alignment, usually for text-derived classes.

  • VERTICAL_ALIGNMENT_CENTER = 1 --- Vertical center alignment, usually for text-derived classes.

  • VERTICAL_ALIGNMENT_BOTTOM = 2 --- Vertical bottom alignment, usually for text-derived classes.

  • VERTICAL_ALIGNMENT_FILL = 3 --- Expand rows to fit height, usually for text-derived classes.


enum InlineAlignment:

  • INLINE_ALIGNMENT_TOP_TO = 0 --- Aligns the top of the inline object (e.g. image, table) to the position of the text specified by INLINE_ALIGNMENT_TO_* constant.

  • INLINE_ALIGNMENT_CENTER_TO = 1 --- Aligns the center of the inline object (e.g. image, table) to the position of the text specified by INLINE_ALIGNMENT_TO_* constant.

  • INLINE_ALIGNMENT_BOTTOM_TO = 2 --- Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by INLINE_ALIGNMENT_TO_* constant.

  • INLINE_ALIGNMENT_TO_TOP = 0 --- Aligns the position of the inline object (e.g. image, table) specified by INLINE_ALIGNMENT_*_TO constant to the top of the text.

  • INLINE_ALIGNMENT_TO_CENTER = 4 --- Aligns the position of the inline object (e.g. image, table) specified by INLINE_ALIGNMENT_*_TO constant to the center of the text.

  • INLINE_ALIGNMENT_TO_BASELINE = 8 --- Aligns the position of the inline object (e.g. image, table) specified by INLINE_ALIGNMENT_*_TO constant to the baseline of the text.

  • INLINE_ALIGNMENT_TO_BOTTOM = 12 --- Aligns inline object (e.g. image, table) to the bottom of the text.

  • INLINE_ALIGNMENT_TOP = 0 --- Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP.

  • INLINE_ALIGNMENT_CENTER = 5 --- Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER.

  • INLINE_ALIGNMENT_BOTTOM = 14 --- Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM.

  • INLINE_ALIGNMENT_IMAGE_MASK = 3 --- A bit mask for INLINE_ALIGNMENT_*_TO alignment constants.

  • INLINE_ALIGNMENT_TEXT_MASK = 12 --- A bit mask for INLINE_ALIGNMENT_TO_* alignment constants.


enum Key:

  • KEY_NONE = 0 --- Enum value which doesn't correspond to any key. This is used to initialize Key properties with a generic state.

  • KEY_SPECIAL = 4194304 --- Keycodes with this bit applied are non-printable.

  • KEY_ESCAPE = 4194305 --- Escape key.

  • KEY_TAB = 4194306 --- Tab key.

  • KEY_BACKTAB = 4194307 --- Shift + Tab key.

  • KEY_BACKSPACE = 4194308 --- Backspace key.

  • KEY_ENTER = 4194309 --- Return key (on the main keyboard).

  • KEY_KP_ENTER = 4194310 --- Enter key on the numeric keypad.

  • KEY_INSERT = 4194311 --- Insert key.

  • KEY_DELETE = 4194312 --- Delete key.

  • KEY_PAUSE = 4194313 --- Pause key.

  • KEY_PRINT = 4194314 --- Print Screen key.

  • KEY_SYSREQ = 4194315 --- System Request key.

  • KEY_CLEAR = 4194316 --- Clear key.

  • KEY_HOME = 4194317 --- Home key.

  • KEY_END = 4194318 --- End key.

  • KEY_LEFT = 4194319 --- Left arrow key.

  • KEY_UP = 4194320 --- Up arrow key.

  • KEY_RIGHT = 4194321 --- Right arrow key.

  • KEY_DOWN = 4194322 --- Down arrow key.

  • KEY_PAGEUP = 4194323 --- Page Up key.

  • KEY_PAGEDOWN = 4194324 --- Page Down key.

  • KEY_SHIFT = 4194325 --- Shift key.

  • KEY_CTRL = 4194326 --- Control key.

  • KEY_META = 4194327 --- Meta key.

  • KEY_ALT = 4194328 --- Alt key.

  • KEY_CAPSLOCK = 4194329 --- Caps Lock key.

  • KEY_NUMLOCK = 4194330 --- Num Lock key.

  • KEY_SCROLLLOCK = 4194331 --- Scroll Lock key.

  • KEY_F1 = 4194332 --- F1 key.

  • KEY_F2 = 4194333 --- F2 key.

  • KEY_F3 = 4194334 --- F3 key.

  • KEY_F4 = 4194335 --- F4 key.

  • KEY_F5 = 4194336 --- F5 key.

  • KEY_F6 = 4194337 --- F6 key.

  • KEY_F7 = 4194338 --- F7 key.

  • KEY_F8 = 4194339 --- F8 key.

  • KEY_F9 = 4194340 --- F9 key.

  • KEY_F10 = 4194341 --- F10 key.

  • KEY_F11 = 4194342 --- F11 key.

  • KEY_F12 = 4194343 --- F12 key.

  • KEY_F13 = 4194344 --- F13 key.

  • KEY_F14 = 4194345 --- F14 key.

  • KEY_F15 = 4194346 --- F15 key.

  • KEY_F16 = 4194347 --- F16 key.

  • KEY_F17 = 4194348 --- F17 key.

  • KEY_F18 = 4194349 --- F18 key.

  • KEY_F19 = 4194350 --- F19 key.

  • KEY_F20 = 4194351 --- F20 key.

  • KEY_F21 = 4194352 --- F21 key.

  • KEY_F22 = 4194353 --- F22 key.

  • KEY_F23 = 4194354 --- F23 key.

  • KEY_F24 = 4194355 --- F24 key.

  • KEY_F25 = 4194356 --- F25 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F26 = 4194357 --- F26 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F27 = 4194358 --- F27 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F28 = 4194359 --- F28 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F29 = 4194360 --- F29 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F30 = 4194361 --- F30 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F31 = 4194362 --- F31 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F32 = 4194363 --- F32 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F33 = 4194364 --- F33 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F34 = 4194365 --- F34 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_F35 = 4194366 --- F35 key. Only supported on macOS and Linux due to a Windows limitation.

  • KEY_KP_MULTIPLY = 4194433 --- Multiply (*) key on the numeric keypad.

  • KEY_KP_DIVIDE = 4194434 --- Divide (/) key on the numeric keypad.

  • KEY_KP_SUBTRACT = 4194435 --- Subtract (-) key on the numeric keypad.

  • KEY_KP_PERIOD = 4194436 --- Period (.) key on the numeric keypad.

  • KEY_KP_ADD = 4194437 --- Add (+) key on the numeric keypad.

  • KEY_KP_0 = 4194438 --- Number 0 on the numeric keypad.

  • KEY_KP_1 = 4194439 --- Number 1 on the numeric keypad.

  • KEY_KP_2 = 4194440 --- Number 2 on the numeric keypad.

  • KEY_KP_3 = 4194441 --- Number 3 on the numeric keypad.

  • KEY_KP_4 = 4194442 --- Number 4 on the numeric keypad.

  • KEY_KP_5 = 4194443 --- Number 5 on the numeric keypad.

  • KEY_KP_6 = 4194444 --- Number 6 on the numeric keypad.

  • KEY_KP_7 = 4194445 --- Number 7 on the numeric keypad.

  • KEY_KP_8 = 4194446 --- Number 8 on the numeric keypad.

  • KEY_KP_9 = 4194447 --- Number 9 on the numeric keypad.

  • KEY_SUPER_L = 4194368 --- Left Super key (Windows key).

  • KEY_SUPER_R = 4194369 --- Right Super key (Windows key).

  • KEY_MENU = 4194370 --- Context menu key.

  • KEY_HYPER_L = 4194371 --- Left Hyper key.

  • KEY_HYPER_R = 4194372 --- Right Hyper key.

  • KEY_HELP = 4194373 --- Help key.

  • KEY_DIRECTION_L = 4194374 --- Left Direction key.

  • KEY_DIRECTION_R = 4194375 --- Right Direction key.

  • KEY_BACK = 4194376 --- Media back key. Not to be confused with the Back button on an Android device.

  • KEY_FORWARD = 4194377 --- Media forward key.

  • KEY_STOP = 4194378 --- Media stop key.

  • KEY_REFRESH = 4194379 --- Media refresh key.

  • KEY_VOLUMEDOWN = 4194380 --- Volume down key.

  • KEY_VOLUMEMUTE = 4194381 --- Mute volume key.

  • KEY_VOLUMEUP = 4194382 --- Volume up key.

  • KEY_BASSBOOST = 4194383 --- Bass Boost key.

  • KEY_BASSUP = 4194384 --- Bass up key.

  • KEY_BASSDOWN = 4194385 --- Bass down key.

  • KEY_TREBLEUP = 4194386 --- Treble up key.

  • KEY_TREBLEDOWN = 4194387 --- Treble down key.

  • KEY_MEDIAPLAY = 4194388 --- Media play key.

  • KEY_MEDIASTOP = 4194389 --- Media stop key.

  • KEY_MEDIAPREVIOUS = 4194390 --- Previous song key.

  • KEY_MEDIANEXT = 4194391 --- Next song key.

  • KEY_MEDIARECORD = 4194392 --- Media record key.

  • KEY_HOMEPAGE = 4194393 --- Home page key.

  • KEY_FAVORITES = 4194394 --- Favorites key.

  • KEY_SEARCH = 4194395 --- Search key.

  • KEY_STANDBY = 4194396 --- Standby key.

  • KEY_OPENURL = 4194397 --- Open URL / Launch Browser key.

  • KEY_LAUNCHMAIL = 4194398 --- Launch Mail key.

  • KEY_LAUNCHMEDIA = 4194399 --- Launch Media key.

  • KEY_LAUNCH0 = 4194400 --- Launch Shortcut 0 key.

  • KEY_LAUNCH1 = 4194401 --- Launch Shortcut 1 key.

  • KEY_LAUNCH2 = 4194402 --- Launch Shortcut 2 key.

  • KEY_LAUNCH3 = 4194403 --- Launch Shortcut 3 key.

  • KEY_LAUNCH4 = 4194404 --- Launch Shortcut 4 key.

  • KEY_LAUNCH5 = 4194405 --- Launch Shortcut 5 key.

  • KEY_LAUNCH6 = 4194406 --- Launch Shortcut 6 key.

  • KEY_LAUNCH7 = 4194407 --- Launch Shortcut 7 key.

  • KEY_LAUNCH8 = 4194408 --- Launch Shortcut 8 key.

  • KEY_LAUNCH9 = 4194409 --- Launch Shortcut 9 key.

  • KEY_LAUNCHA = 4194410 --- Launch Shortcut A key.

  • KEY_LAUNCHB = 4194411 --- Launch Shortcut B key.

  • KEY_LAUNCHC = 4194412 --- Launch Shortcut C key.

  • KEY_LAUNCHD = 4194413 --- Launch Shortcut D key.

  • KEY_LAUNCHE = 4194414 --- Launch Shortcut E key.

  • KEY_LAUNCHF = 4194415 --- Launch Shortcut F key.

  • KEY_UNKNOWN = 16777215 --- Unknown key.

  • KEY_SPACE = 32 --- Space key.

  • KEY_EXCLAM = 33 --- ! key.

  • KEY_QUOTEDBL = 34 --- " key.

  • KEY_NUMBERSIGN = 35 --- # key.

  • KEY_DOLLAR = 36 --- $ key.

  • KEY_PERCENT = 37 --- % key.

  • KEY_AMPERSAND = 38 --- & key.

  • KEY_APOSTROPHE = 39 --- ' key.

  • KEY_PARENLEFT = 40 --- ( key.

  • KEY_PARENRIGHT = 41 --- ) key.

  • KEY_ASTERISK = 42 --- * key.

  • KEY_PLUS = 43 --- + key.

  • KEY_COMMA = 44 --- , key.

  • KEY_MINUS = 45 --- - key.

  • KEY_PERIOD = 46 --- . key.

  • KEY_SLASH = 47 --- / key.

  • KEY_0 = 48 --- Number 0.

  • KEY_1 = 49 --- Number 1.

  • KEY_2 = 50 --- Number 2.

  • KEY_3 = 51 --- Number 3.

  • KEY_4 = 52 --- Number 4.

  • KEY_5 = 53 --- Number 5.

  • KEY_6 = 54 --- Number 6.

  • KEY_7 = 55 --- Number 7.

  • KEY_8 = 56 --- Number 8.

  • KEY_9 = 57 --- Number 9.

  • KEY_COLON = 58 --- : key.

  • KEY_SEMICOLON = 59 --- ; key.

  • KEY_LESS = 60 --- < key.

  • KEY_EQUAL = 61 --- = key.

  • KEY_GREATER = 62 --- > key.

  • KEY_QUESTION = 63 --- ? key.

  • KEY_AT = 64 --- @ key.

  • KEY_A = 65 --- A key.

  • KEY_B = 66 --- B key.

  • KEY_C = 67 --- C key.

  • KEY_D = 68 --- D key.

  • KEY_E = 69 --- E key.

  • KEY_F = 70 --- F key.

  • KEY_G = 71 --- G key.

  • KEY_H = 72 --- H key.

  • KEY_I = 73 --- I key.

  • KEY_J = 74 --- J key.

  • KEY_K = 75 --- K key.

  • KEY_L = 76 --- L key.

  • KEY_M = 77 --- M key.

  • KEY_N = 78 --- N key.

  • KEY_O = 79 --- O key.

  • KEY_P = 80 --- P key.

  • KEY_Q = 81 --- Q key.

  • KEY_R = 82 --- R key.

  • KEY_S = 83 --- S key.

  • KEY_T = 84 --- T key.

  • KEY_U = 85 --- U key.

  • KEY_V = 86 --- V key.

  • KEY_W = 87 --- W key.

  • KEY_X = 88 --- X key.

  • KEY_Y = 89 --- Y key.

  • KEY_Z = 90 --- Z key.

  • KEY_BRACKETLEFT = 91 --- [ key.

  • KEY_BACKSLASH = 92 --- \ key.

  • KEY_BRACKETRIGHT = 93 --- ] key.

  • KEY_ASCIICIRCUM = 94 --- ^ key.

  • KEY_UNDERSCORE = 95 --- _ key.

  • KEY_QUOTELEFT = 96 --- ` key.

  • KEY_BRACELEFT = 123 --- { key.

  • KEY_BAR = 124 --- | key.

  • KEY_BRACERIGHT = 125 --- } key.

  • KEY_ASCIITILDE = 126 --- ~ key.

  • KEY_NOBREAKSPACE = 160 --- Non-breakable space key.

  • KEY_EXCLAMDOWN = 161 --- ¡ key.

  • KEY_CENT = 162 --- ¢ key.

  • KEY_STERLING = 163 --- £ key.

  • KEY_CURRENCY = 164 --- ¤ key.

  • KEY_YEN = 165 --- ¥ key.

  • KEY_BROKENBAR = 166 --- ¦ key.

  • KEY_SECTION = 167 --- § key.

  • KEY_DIAERESIS = 168 --- ¨ key.

  • KEY_COPYRIGHT = 169 --- © key.

  • KEY_ORDFEMININE = 170 --- ª key.

  • KEY_GUILLEMOTLEFT = 171 --- « key.

  • KEY_NOTSIGN = 172 --- ¬ key.

  • KEY_HYPHEN = 173 --- Soft hyphen key.

  • KEY_REGISTERED = 174 --- ® key.

  • KEY_MACRON = 175 --- ¯ key.

  • KEY_DEGREE = 176 --- ° key.

  • KEY_PLUSMINUS = 177 --- ± key.

  • KEY_TWOSUPERIOR = 178 --- ² key.

  • KEY_THREESUPERIOR = 179 --- ³ key.

  • KEY_ACUTE = 180 --- ´ key.

  • KEY_MU = 181 --- µ key.

  • KEY_PARAGRAPH = 182 --- ¶ key.

  • KEY_PERIODCENTERED = 183 --- · key.

  • KEY_CEDILLA = 184 --- ¸ key.

  • KEY_ONESUPERIOR = 185 --- ¹ key.

  • KEY_MASCULINE = 186 --- º key.

  • KEY_GUILLEMOTRIGHT = 187 --- » key.

  • KEY_ONEQUARTER = 188 --- ¼ key.

  • KEY_ONEHALF = 189 --- ½ key.

  • KEY_THREEQUARTERS = 190 --- ¾ key.

  • KEY_QUESTIONDOWN = 191 --- ¿ key.

  • KEY_AGRAVE = 192 --- À key.

  • KEY_AACUTE = 193 --- Á key.

  • KEY_ACIRCUMFLEX = 194 --- Â key.

  • KEY_ATILDE = 195 --- Ã key.

  • KEY_ADIAERESIS = 196 --- Ä key.

  • KEY_ARING = 197 --- Å key.

  • KEY_AE = 198 --- Æ key.

  • KEY_CCEDILLA = 199 --- Ç key.

  • KEY_EGRAVE = 200 --- È key.

  • KEY_EACUTE = 201 --- É key.

  • KEY_ECIRCUMFLEX = 202 --- Ê key.

  • KEY_EDIAERESIS = 203 --- Ë key.

  • KEY_IGRAVE = 204 --- Ì key.

  • KEY_IACUTE = 205 --- Í key.

  • KEY_ICIRCUMFLEX = 206 --- Î key.

  • KEY_IDIAERESIS = 207 --- Ï key.

  • KEY_ETH = 208 --- Ð key.

  • KEY_NTILDE = 209 --- Ñ key.

  • KEY_OGRAVE = 210 --- Ò key.

  • KEY_OACUTE = 211 --- Ó key.

  • KEY_OCIRCUMFLEX = 212 --- Ô key.

  • KEY_OTILDE = 213 --- Õ key.

  • KEY_ODIAERESIS = 214 --- Ö key.

  • KEY_MULTIPLY = 215 --- × key.

  • KEY_OOBLIQUE = 216 --- Ø key.

  • KEY_UGRAVE = 217 --- Ù key.

  • KEY_UACUTE = 218 --- Ú key.

  • KEY_UCIRCUMFLEX = 219 --- Û key.

  • KEY_UDIAERESIS = 220 --- Ü key.

  • KEY_YACUTE = 221 --- Ý key.

  • KEY_THORN = 222 --- Þ key.

  • KEY_SSHARP = 223 --- ß key.

  • KEY_DIVISION = 247 --- ÷ key.

  • KEY_YDIAERESIS = 255 --- ÿ key.


enum KeyModifierMask:

  • KEY_CODE_MASK = 8388607 --- Key Code mask.

  • KEY_MODIFIER_MASK = 532676608 --- Modifier key mask.

  • KEY_MASK_CMD_OR_CTRL = 16777216 --- Automatically remapped to KEY_META on macOS and KEY_CTRL on other platforms, this mask is never set in the actual events, and should be used for key mapping only.

  • KEY_MASK_SHIFT = 33554432 --- Shift key mask.

  • KEY_MASK_ALT = 67108864 --- Alt or Option (on macOS) key mask.

  • KEY_MASK_META = 134217728 --- Command (on macOS) or Meta/Windows key mask.

  • KEY_MASK_CTRL = 268435456 --- Ctrl key mask.

  • KEY_MASK_KPAD = 536870912 --- Keypad key mask.

  • KEY_MASK_GROUP_SWITCH = 1073741824 --- Group Switch key mask.


enum MouseButton:

  • MOUSE_BUTTON_NONE = 0 --- Enum value which doesn't correspond to any mouse button. This is used to initialize MouseButton properties with a generic state.

  • MOUSE_BUTTON_LEFT = 1 --- Left mouse button.

  • MOUSE_BUTTON_RIGHT = 2 --- Right mouse button.

  • MOUSE_BUTTON_MIDDLE = 3 --- Middle mouse button.

  • MOUSE_BUTTON_WHEEL_UP = 4 --- Mouse wheel up.

  • MOUSE_BUTTON_WHEEL_DOWN = 5 --- Mouse wheel down.

  • MOUSE_BUTTON_WHEEL_LEFT = 6 --- Mouse wheel left button (only present on some mice).

  • MOUSE_BUTTON_WHEEL_RIGHT = 7 --- Mouse wheel right button (only present on some mice).

  • MOUSE_BUTTON_XBUTTON1 = 8 --- Extra mouse button 1 (only present on some mice).

  • MOUSE_BUTTON_XBUTTON2 = 9 --- Extra mouse button 2 (only present on some mice).

  • MOUSE_BUTTON_MASK_LEFT = 1 --- Left mouse button mask.

  • MOUSE_BUTTON_MASK_RIGHT = 2 --- Right mouse button mask.

  • MOUSE_BUTTON_MASK_MIDDLE = 4 --- Middle mouse button mask.

  • MOUSE_BUTTON_MASK_XBUTTON1 = 128 --- Extra mouse button 1 mask.

  • MOUSE_BUTTON_MASK_XBUTTON2 = 256 --- Extra mouse button 2 mask.


enum JoyButton:

  • JOY_BUTTON_INVALID = -1 --- An invalid game controller button.

  • JOY_BUTTON_A = 0 --- Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B.

  • JOY_BUTTON_B = 1 --- Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A.

  • JOY_BUTTON_X = 2 --- Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y.

  • JOY_BUTTON_Y = 3 --- Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X.

  • JOY_BUTTON_BACK = 4 --- Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button.

  • JOY_BUTTON_GUIDE = 5 --- Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button.

  • JOY_BUTTON_START = 6 --- Game controller SDL start button. Corresponds to the Nintendo + button.

  • JOY_BUTTON_LEFT_STICK = 7 --- Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button.

  • JOY_BUTTON_RIGHT_STICK = 8 --- Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button.

  • JOY_BUTTON_LEFT_SHOULDER = 9 --- Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button.

  • JOY_BUTTON_RIGHT_SHOULDER = 10 --- Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button.

  • JOY_BUTTON_DPAD_UP = 11 --- Game controller D-pad up button.

  • JOY_BUTTON_DPAD_DOWN = 12 --- Game controller D-pad down button.

  • JOY_BUTTON_DPAD_LEFT = 13 --- Game controller D-pad left button.

  • JOY_BUTTON_DPAD_RIGHT = 14 --- Game controller D-pad right button.

  • JOY_BUTTON_MISC1 = 15 --- Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button.

  • JOY_BUTTON_PADDLE1 = 16 --- Game controller SDL paddle 1 button.

  • JOY_BUTTON_PADDLE2 = 17 --- Game controller SDL paddle 2 button.

  • JOY_BUTTON_PADDLE3 = 18 --- Game controller SDL paddle 3 button.

  • JOY_BUTTON_PADDLE4 = 19 --- Game controller SDL paddle 4 button.

  • JOY_BUTTON_TOUCHPAD = 20 --- Game controller SDL touchpad button.

  • JOY_BUTTON_SDL_MAX = 21 --- The number of SDL game controller buttons.

  • JOY_BUTTON_MAX = 128 --- The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:

    • Android: Up to 36 buttons.

    • Linux: Up to 80 buttons.

    • Windows and macOS: Up to 128 buttons.


enum JoyAxis:

  • JOY_AXIS_INVALID = -1 --- An invalid game controller axis.

  • JOY_AXIS_LEFT_X = 0 --- Game controller left joystick x-axis.

  • JOY_AXIS_LEFT_Y = 1 --- Game controller left joystick y-axis.

  • JOY_AXIS_RIGHT_X = 2 --- Game controller right joystick x-axis.

  • JOY_AXIS_RIGHT_Y = 3 --- Game controller right joystick y-axis.

  • JOY_AXIS_TRIGGER_LEFT = 4 --- Game controller left trigger axis.

  • JOY_AXIS_TRIGGER_RIGHT = 5 --- Game controller right trigger axis.

  • JOY_AXIS_SDL_MAX = 6 --- The number of SDL game controller axes.

  • JOY_AXIS_MAX = 10 --- The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.


enum MIDIMessage:

  • MIDI_MESSAGE_NONE = 0 --- Enum value which doesn't correspond to any MIDI message. This is used to initialize MIDIMessage properties with a generic state.

  • MIDI_MESSAGE_NOTE_OFF = 8 --- MIDI note OFF message. See the documentation of InputEventMIDI for information of how to use MIDI inputs.

  • MIDI_MESSAGE_NOTE_ON = 9 --- MIDI note ON message. See the documentation of InputEventMIDI for information of how to use MIDI inputs.

  • MIDI_MESSAGE_AFTERTOUCH = 10 --- MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".

  • MIDI_MESSAGE_CONTROL_CHANGE = 11 --- MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.

  • MIDI_MESSAGE_PROGRAM_CHANGE = 12 --- MIDI program change message. This message sent when the program patch number changes.

  • MIDI_MESSAGE_CHANNEL_PRESSURE = 13 --- MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.

  • MIDI_MESSAGE_PITCH_BEND = 14 --- MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).

  • MIDI_MESSAGE_SYSTEM_EXCLUSIVE = 240 --- MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot.

  • MIDI_MESSAGE_QUARTER_FRAME = 241 --- MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot.

  • MIDI_MESSAGE_SONG_POSITION_POINTER = 242 --- MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot.

  • MIDI_MESSAGE_SONG_SELECT = 243 --- MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot.

  • MIDI_MESSAGE_TUNE_REQUEST = 246 --- MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.

  • MIDI_MESSAGE_TIMING_CLOCK = 248 --- MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.

  • MIDI_MESSAGE_START = 250 --- MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.

  • MIDI_MESSAGE_CONTINUE = 251 --- MIDI continue message. Continue at the point the sequence was stopped.

  • MIDI_MESSAGE_STOP = 252 --- MIDI stop message. Stop the current sequence.

  • MIDI_MESSAGE_ACTIVE_SENSING = 254 --- MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.

  • MIDI_MESSAGE_SYSTEM_RESET = 255 --- MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.


enum Error:

  • OK = 0 --- Methods that return Error return OK when no error occurred. Note that many functions don't return an error code but will print error messages to standard output.

Since OK has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:

var err = method_that_returns_error()
if err != OK:
    print("Failure!")
# Or, equivalent:
if err:
    print("Still failing!")
  • FAILED = 1 --- Generic error.

  • ERR_UNAVAILABLE = 2 --- Unavailable error.

  • ERR_UNCONFIGURED = 3 --- Unconfigured error.

  • ERR_UNAUTHORIZED = 4 --- Unauthorized error.

  • ERR_PARAMETER_RANGE_ERROR = 5 --- Parameter range error.

  • ERR_OUT_OF_MEMORY = 6 --- Out of memory (OOM) error.

  • ERR_FILE_NOT_FOUND = 7 --- File: Not found error.

  • ERR_FILE_BAD_DRIVE = 8 --- File: Bad drive error.

  • ERR_FILE_BAD_PATH = 9 --- File: Bad path error.

  • ERR_FILE_NO_PERMISSION = 10 --- File: No permission error.

  • ERR_FILE_ALREADY_IN_USE = 11 --- File: Already in use error.

  • ERR_FILE_CANT_OPEN = 12 --- File: Can't open error.

  • ERR_FILE_CANT_WRITE = 13 --- File: Can't write error.

  • ERR_FILE_CANT_READ = 14 --- File: Can't read error.

  • ERR_FILE_UNRECOGNIZED = 15 --- File: Unrecognized error.

  • ERR_FILE_CORRUPT = 16 --- File: Corrupt error.

  • ERR_FILE_MISSING_DEPENDENCIES = 17 --- File: Missing dependencies error.

  • ERR_FILE_EOF = 18 --- File: End of file (EOF) error.

  • ERR_CANT_OPEN = 19 --- Can't open error.