Stefan Monnier writes: >> * 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. > > Can you provide some context? When would Lisp code inject events with > an "up-" modifier? How else would you want to call the key release from a piano keyboard? It is basically auxiliary information that can often be discarded: the key press event is much more important when using a piano keyboard. I'll append my current context. Note that when you remove the code pre-filling the modifier-cache (and haven't applied the given patch), Emacs will crash when you press (actually when you release) a key on the connected Midi keyboard, generating a [Ch1 up-C_4] event (for example). The long-term goal is to integrate Midi event generation into the Emacs binary. But at the current point of time, I am still experimenting around with figuring out just what information should arrive in what form, and feeding Emacs with such non-native events should be possible as well. If you don't have actual Midi hardware, install vmpk (a virtual Midi keyboard) and do sudo insmod snd_virmidi then use the "Connections" menu of vmpk for connecting the keyboard output to the first virtual Midi device, load the attached file, and then do M-x midikbd-open RET RET in order to have keypresses and releases from the keyboard arrive in Emacs. If the "... is undefined" messages are not helpful enough, try M-: (while t (message "%S" (read-event))) RET to see more details. End with C-g of course. -- David Kastrup