Garry's Mod Wiki

system.HasFocus

  boolean system.HasFocus()

Description

Returns whether or not the game window has focus.

This function does not work on dedicated servers and will instead return no value.

Returns

1 boolean
Whether or not the game window has focus.