AG_GlobalKeys
—
agar application-wide keyboard shortcuts
#include <agar/core.h>
#include <agar/gui.h>
The AG_GlobalKeys
interface associates
application-wide keyboard shortcuts to specified callback routines.
Note that AG_GlobalKeys
entirely ignores
the status of Agar windows and widgets. To implement keyboard operations
specific to a given Agar window or widget, one would instead use
AG_ActionOnKeyDown(3)
or
AG_ActionOnKeyUp(3).
For a more low-level interface to keyboard processing, the base
AG_Widget(3)
class also provides the ‘key-down’ and ‘key-up’
event handlers.
The AG_GlobalKeys
interface first appeared
in Agar 1.0. AG_BindStdGlobalKeys
() first appeared
in Agar 1.5.0.