]> git.eshelyaron.com Git - emacs.git/commit
Deal gracefully with up-events (Bug#19746)
authorDavid Kastrup <dak@gnu.org>
Wed, 28 Jan 2015 10:53:54 +0000 (11:53 +0100)
committerDavid Kastrup <dak@gnu.org>
Wed, 12 Aug 2015 17:21:29 +0000 (19:21 +0200)
commitad0b6dd05a1a782dc12e921fc077aef46698e063
treeaaf012106f40201fdfe031324c10021fe6c43897
parentb367d7fc7b234bb98b330ac61bf35372f0f0acae
Deal gracefully with up-events (Bug#19746)

* keyboard.c (apply_modifiers_uncached, parse_solitary_modifier)
(parse_modifiers_uncached): React gracefully to "up-" modifiers:
those may easily be injected by user-level Lisp code.
(read_key_sequence): Discard unbound up-events like unbound
down-events: they are even more likely only relevant for special
purposes.

While Emacs will not produce up-events on its own currently (those are
converted to drag or click events before being converted to
Lisp-readable structures), the input queue can be made to contain them
by synthesizing events to `unread-command-events'.  Emacs should deal
consistently with such events.
src/keyboard.c