GM:KeyPress
This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.
Description
Called whenever a player pressed a key included within the IN keys.
For a more general purpose function that handles all kinds of input, see GM:PlayerButtonDown.
Despite being a predicted hook, it will still be called in singleplayer for your convenience.
Due to this being a predicted hook, ParticleEffects created only serverside from this hook will not be networked to the client, so make sure to do that on both realms.
Arguments
Example
hi
will be printed to the console when the player presses the +use key (e).
Output: hi
Example
When a player tries to jump, they will be shot straight up in the air.