Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KeyPressedThreshold = time.Millisecond * 700
KeyPressedThreshold defines how long a key must be hold down to enter Pressed state
View Source
var PollInterval = time.Millisecond * 30
PollInterval defined how long to pause before reading new key states
Functions ¶
Types ¶
type State ¶
type State int
possible states are
Down - key was pressed Pressed - key was pressed and hold for at least KeyPressedThreshold Clicked - key was pressed and released before KeyPressedThreshold Released - key was pressed and released
State changes are Down -> Clicked -> EventRelease Down -> Pressed -> EventRelease
Click to show internal directories.
Click to hide internal directories.