Add `input_type` enum to `Binding` typedef

An input type of B_KEYBOARD will indicated this binding was created with
"bindsym", "bindcode", or "bind" and should only run on key press
events.

An input type of B_MOUSE will indicate this binding was created with
"bindmouse" and should only run on button press events (not yet
implemented).

For more information see #558.
This commit is contained in:
Tony Crisci 2014-01-09 11:59:21 -05:00 committed by Michael Stapelberg
parent 7bddf9add5
commit 5401271984
1 changed files with 9 additions and 0 deletions

View File

@ -213,6 +213,15 @@ struct regex {
* *
*/ */
struct Binding { struct Binding {
/* The type of input this binding is for. (Mouse bindings are not yet
* implemented. All bindings are currently assumed to be keyboard bindings.) */
enum {
/* Created with "bindsym", "bindcode", and "bind" */
B_KEYBOARD = 0,
/* Created with "bindmouse" (not yet implemented). */
B_MOUSE = 1,
} input_type;
/** If true, the binding should be executed upon a KeyRelease event, not a /** If true, the binding should be executed upon a KeyRelease event, not a
* KeyPress (the default). */ * KeyPress (the default). */
enum { enum {