all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Ignoring a key event completely
Date: Mon, 12 May 2008 20:53:39 -0600	[thread overview]
Message-ID: <g0avrj$ndp$1@ger.gmane.org> (raw)
In-Reply-To: <20080512141606.GA17448@debian.homenet>

Michael Schutte wrote:
> Hi everybody,
> 
> The XKB layout I’m using [1] defines an additional modifier, the
> Navigation key.  Whenever I press it, Emacs responds by beeping and
> printing “<key-17> is undefined”.  I can suppress this by
> global-set-keying it to 'ignore, but this does not turn it off
> completely.  In particular:
> 
>  * Hitting the key still interrupts Isearch, which is very annoying.
>  * M-Nav, C-Nav and C-M-Nav also need to be 'ignored, which does not
>    seem very elegant to me.
>  * Messages appearing in the echo area are nuked when I press Nav (this
>    is minor, of course, but you get the idea).
> 
> So, I’m looking for a way to make Emacs completely forget about the key,
> to make it as no-oppy as Shift, Ctrl, etc., but I simply can’t find out
> how to do this on my own.  Could anyone give me a clue?
> 
> [1] <https://neo.eigenheimstrasse.de/svn/linux/X/de>; grep for Mod4

I don't think I've ever been on a system that generates events like
<key-17>.  What does Emacs display after typing `a', then the Navigation
key, then `C-h l'?

In any case, it looks like the Navigation key is not a modifier key like
Shift, Control, etc.  So perhaps something like this will work:

(define-key special-event-map (kbd "<key-17>") 'ignore)

See the "Controlling Active Maps" and the "Special Events" nodes of the
Emacs Lisp manual.

-- 
Kevin Rodgers
Denver, Colorado, USA





  reply	other threads:[~2008-05-13  2:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 14:16 Ignoring a key event completely Michael Schutte
2008-05-13  2:53 ` Kevin Rodgers [this message]
2008-05-13  7:44   ` Michael Schutte
2008-05-13 12:54     ` Kevin Rodgers
2008-05-14 15:03       ` Michael Schutte

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='g0avrj$ndp$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.