From: Tony Crisci Date: Thu, 9 Jan 2014 16:59:21 +0000 (-0500) Subject: Add `input_type` enum to `Binding` typedef X-Git-Tag: 4.8~147 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=54012719842cdd99286b702dbe72121709a503b8;p=i3%2Fi3 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. --- diff --git a/include/data.h b/include/data.h index 8a44fb1d..6fc7b40a 100644 --- a/include/data.h +++ b/include/data.h @@ -213,6 +213,15 @@ struct regex { * */ 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 * KeyPress (the default). */ enum {