gri3-wm/src
Michael Stapelberg d77d40173a Only add NumLock fallback where necessary.
Previously, we always discarded the NumLock bit when looking up key
bindings for key press events, and we always grabbed every keycode with
and without the NumLock modifier.

With this commit, the NumLock bit is no longer discarded: since the
previous commit 3bd5e6e5c8 we can
correctly look up key bindings with/without the NumLock bit, as both
variants are stored in |keycodes_head|.

Further, before adding the NumLock fallback (resulting in grabbing the
keycode with the NumLock modifier), we now check whether the key has the
same meaning when NumLock is enabled. This correctly distinguishes the
KP_End vs. KP_1 case, i.e. one can now use the following key bindings:

    # No longer accidentally triggered when pressing KP_1.
    bindsym KP_End nop KP_End

    # Properly distinguished now:
    bindsym KP_End nop KP_End
    bindsym Mod2+KP_1 nop KP_1

fixes #2346
2016-08-02 20:34:20 +02:00
..
Makefile Add stub Makefiles to allow subdir make calls 2012-07-22 19:57:48 +02:00
assignments.c Mark assignment as run before executing it. 2015-10-25 14:27:08 +01:00
bindings.c Only add NumLock fallback where necessary. 2016-08-02 20:34:20 +02:00
click.c Don't trigger binding on window border click unless --border is given. (#2349) 2016-05-11 20:11:35 +02:00
commands.c Cast con id as uintptr_t (#2298) 2016-04-15 00:27:43 -07:00
commands_parser.c Turn "char *" into "const char *" for all command parser functions. 2015-09-28 14:24:08 +02:00
con.c Smart option added to hide_edge_borders config param (#2191) (#2191) 2016-05-10 20:27:20 +02:00
config.c Remove dead code guarded with "#if 0 … #endif" (#2338) 2016-05-05 14:18:04 +02:00
config_directives.c Smart option added to hide_edge_borders config param (#2191) (#2191) 2016-05-10 20:27:20 +02:00
config_parser.c Explicitly terminate fallback in set_from_resource. (#2366) 2016-05-31 22:58:23 +02:00
debug.c Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
display_version.c Display which config is used in --more_version 2015-07-10 22:54:25 +08:00
ewmh.c split atoms.xmacro into 2 files to obtain _NET_SUPPORTED count 2016-02-23 21:48:18 +01:00
fake_outputs.c libi3: change scalloc() signature to match calloc() 2015-08-03 12:50:13 +03:00
floating.c Remove dead code guarded with "#if 0 … #endif" (#2338) 2016-05-05 14:18:04 +02:00
handlers.c Don't change border style if BS_NORMAL is requested in motif hints (#2386) 2016-06-25 21:35:36 +02:00
i3.mk Don't use pthread on OpenBSD 2016-06-11 14:47:26 +02:00
ipc.c Introduced a new GET_BINDING_MODES message type and reply. (#2376) 2016-06-15 22:25:22 +02:00
key_press.c Avoid rendering the tree twice in a row 2015-12-15 13:59:50 -05:00
load_layout.c Remove redundant depth argument from x_con_init(). (#2323) 2016-05-05 14:18:27 +02:00
log.c Don't use pthread on OpenBSD 2016-06-11 14:47:26 +02:00
main.c Properly close disabled outputs restored during a restart. (#2337) 2016-05-08 12:49:24 +02:00
manage.c Focus a newly managed container only if it doesn't use the globally active input model. (#2317) 2016-04-26 08:09:07 +01:00
match.c Merge pull request #2113 from Airblader/bug-2111 2015-12-25 17:14:29 +01:00
move.c Handle the EWMH atom _NET_WM_DESKTOP. 2016-01-18 12:13:36 +01:00
output.c Keep a sticky window focused if it was the focused window on the source workspace. 2015-09-24 22:10:17 +02:00
randr.c Properly close disabled outputs restored during a restart. (#2337) 2016-05-08 12:49:24 +02:00
regex.c Fix multiple memory leaks with regular expressions. 2015-10-28 14:40:10 +01:00
render.c Fix spelling mistakes 2016-04-04 09:33:59 +02:00
resize.c Refactor extern definition of conn and root_screen 2015-12-29 12:47:12 +01:00
restore_layout.c ASAN: trigger leak before exiting 2016-01-09 17:18:05 +01:00
scratchpad.c Make sure sticky windows pop to the front if they get sticky while not being on a visible workspace. 2015-09-13 20:40:20 +02:00
sd-daemon.c Always use socket activation 2016-06-11 14:47:23 +02:00
sighandler.c Fix spelling mistakes 2016-04-04 09:33:59 +02:00
startup.c Use 64 bit time_t 2016-06-11 12:58:16 +02:00
tree.c Fix spelling mistakes 2016-04-04 09:33:59 +02:00
util.c Add missing MAX macros, ensure that i3 can be compiled without pango 2016-03-23 10:58:10 -05:00
version.c Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
window.c window_update_motif_hints(): uint32_t for fields, fixes #2238 2016-03-02 23:31:08 +01:00
workspace.c Determine focused workspace correctly when moving workspace to output. 2016-02-25 19:12:09 +01:00
x.c Use the last known timestamp when calling xcb_set_input_focus(). (#2332) 2016-05-05 20:46:33 +02:00
xcb.c Only grab the mouse buttons that need to be grabbed. (#2290) 2016-04-13 10:45:57 -07:00
xcursor.c Update copyright notices and get rid of ranges 2015-04-20 17:50:21 -04:00
xinerama.c Remove dead code guarded with "#if 0 … #endif" (#2338) 2016-05-05 14:18:04 +02:00