Garry's Mod Wiki

Revision Difference

Enums/IN#514991

<cat>enum</cat>⤶ <enumeration>⤶ <description>⤶ Unlike <page>BUTTON_CODE</page>, these enums are abstracted to allow the user to bind actions to any key they might prefer.⤶ ⤶ Keybinds using these actions work with two console commands, one starting with a plus and one with a minus symbol. A key press or release will call either the plus or minus command, adding or removing the corresponding enum in the current <page>CUserCmd</page>.⤶ ⤶ Enumerations used by:⤶ * <page>Player:KeyDown</page>⤶ * <page>Player:KeyDownLast</page>⤶ * <page>Player:KeyPressed</page>⤶ * <page>Player:KeyReleased</page>⤶ * <page>CMoveData:AddKey</page>⤶ * <page>CMoveData:GetButtons</page>⤶ * <page>CMoveData:GetOldButtons</page>⤶ * <page>CMoveData:KeyDown</page>⤶ * <page>CMoveData:KeyPressed</page>⤶ * <page>CMoveData:KeyReleased</page>⤶ * <page>CMoveData:KeyWasDown</page>⤶ * <page>CMoveData:SetButtons</page>⤶ * <page>CMoveData:SetOldButtons</page>⤶ * <page>CUserCmd:GetButtons</page>⤶ * <page>CUserCmd:KeyDown</page>⤶ * <page>CUserCmd:RemoveKey</page>⤶ * <page>CUserCmd:SetButtons</page>⤶ * <page>GM:KeyPress</page>⤶ * <page>GM:KeyRelease</page>⤶ </description>⤶ <fields>{{EnumField|IN_ATTACK|1|+attack bound key ( Default: Left Mouse Button )</fields>⤶ ⤶ </enumeration>⤶ ⤶ {{EnumField|IN_JUMP|2|+jump bound key ( Default: Space )}}{{EnumField|IN_DUCK|4|+duck bound key ( Default: CTRL )}}{{EnumField|IN_FORWARD|8|+forward bound key ( Default: W )}}{{EnumField|IN_BACK|16|+back bound key ( Default: S )}}{{EnumField|IN_USE|32|+use bound key ( Default: E )}}{{EnumField|IN_CANCEL|64}}{{EnumField|IN_LEFT|128|+left bound key ( Look left )}}{{EnumField|IN_RIGHT|256|+right bound key ( Look right )}}{{EnumField|IN_MOVELEFT|512|+moveleft bound key ( Default: A )}}{{EnumField|IN_MOVERIGHT|1024|+moveright bound key ( Default: D )}}{{EnumField|IN_ATTACK2|2048|+attack2 bound key ( Default: Right Mouse Button )}}{{EnumField|IN_RUN|4096}}{{EnumField|IN_RELOAD|8192|+reload bound key ( Default: R )}}{{EnumField|IN_ALT1|16384|+alt1 bound key}}{{EnumField|IN_ALT2|32768|+alt2 bound key}}{{EnumField|IN_SCORE|65536|+showscores bound key ( Default: Tab )}}{{EnumField|IN_SPEED|131072|+speed bound key ( Default: Shift )}}{{EnumField|IN_WALK|262144|+walk bound key ( Slow walk )}}{{EnumField|IN_ZOOM|524288|+zoom bound key ( Suit Zoom )}}{{EnumField|IN_WEAPON1|1048576|For use in weapons. Set in the physgun when scrolling an object away from you.}}{{EnumField|IN_WEAPON2|2097152|For use in weapons. Set in the physgun when scrolling an object towards you.}}{{EnumField|IN_BULLRUSH|4194304}}{{EnumField|IN_GRENADE1|8388608|+grenade1 bound key}}{{EnumField|IN_GRENADE2|16777216|+grenade2 bound key}}⤶ }}