From 37a2725da41e363fcdca12d0374b192cd03905d0 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Wed, 28 Jun 2023 21:24:59 +1200 Subject: feat: Added key chording Probably a hacky mess but oh well. Key chords can be done by seperating binds in string with ` `. You can set the quit bind with `quitkey`, default mod+g. (Chords also exited when pressing unbound keys). --- util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util.h') diff --git a/util.h b/util.h index bdc45d8..d29d596 100644 --- a/util.h +++ b/util.h @@ -4,7 +4,8 @@ #include #include -#define evNames {0, 0, "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", "FocusOut", "KeymapNotify", "Expose", "GraphicsExpose", "NoExpose", "VisibilityNotify", "CreateNotify", "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest", "ReparentNotify", "ConfigureNotify", "ConfigureRequest", "GravityNotify", "ResizeRequest", "CirculateNotify", "CirculateRequest", "PropertyNotify", "SelectionClear", "SelectionRequest", "SelectionNotify", "ColormapNotify", "ClientMessage", "MappingNotify", "GenericEvent", "LASTEvent"}; + +std::string getEventName(int e); std::vector split (const std::string &s, char delim); -- cgit v1.2.3