From: David Kastrup <dak@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Let input queue deal gracefully with up-events
Date: Wed, 28 Jan 2015 20:50:34 +0100 [thread overview]
Message-ID: <87d25yptv9.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvk306og0z.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 28 Jan 2015 14:35:54 -0500")
[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> 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
[-- Attachment #2: midi-kbd3.el --]
[-- Type: application/emacs-lisp, Size: 8974 bytes --]
next prev parent reply other threads:[~2015-01-28 19:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 13:31 [PATCH] Let input queue deal gracefully with up-events David Kastrup
2015-01-28 14:58 ` Alan Mackenzie
2015-01-28 15:19 ` [PATCH v1] " David Kastrup
2015-02-05 17:23 ` David Kastrup
2015-02-05 19:11 ` Stefan Monnier
2015-02-05 19:27 ` David Kastrup
2015-02-05 21:07 ` Ivan Shmakov
2015-02-05 21:42 ` David Kastrup
2015-02-05 19:17 ` Ivan Shmakov
2015-01-28 19:35 ` [PATCH] " Stefan Monnier
2015-01-28 19:50 ` David Kastrup [this message]
2015-01-28 22:14 ` Stefan Monnier
2015-01-28 22:55 ` David Kastrup
2015-01-28 22:19 ` Stefan Monnier
2015-01-28 23:06 ` David Kastrup
2015-01-29 3:57 ` Stefan Monnier
2015-01-29 8:49 ` David Kastrup
2015-01-29 15:00 ` Stefan Monnier
2015-01-29 15:14 ` David Kastrup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d25yptv9.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.