From: Roberto E. Vargas Caballero Date: Thu, 15 Nov 2012 14:36:13 +0000 (+0100) Subject: Fix XK_NO_MOD and XK_ANY_MOD behavior X-Git-Url: https://jasonwoof.com/gitweb/?p=st.git;a=commitdiff_plain;h=88bb76c1bccbc8bb68b6776062cd2ef28bda8561;hp=88bb76c1bccbc8bb68b6776062cd2ef28bda8561 Fix XK_NO_MOD and XK_ANY_MOD behavior XK_NO_MOD match a key without modifiers and XK_ANY_MOD match a key does not matter what modifiers are pressed to. Like they are mask the best value for XK_ANY_MOD is all the bits to 1, so the and with any state will be equal to the state. This also imply that is necessary check the case for XK_NO_MOD (no modifiers at all) with some modifier in state, and the inverse (some mask different to XK_ANY_MOD or XK_NO_MOD and no modifiers in state). --- st.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---