[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ignoring a key event completely

From: Kevin Rodgers
Subject: Re: Ignoring a key event completely
Date: Mon, 12 May 2008 20:53:39 -0600
User-agent: Thunderbird (Macintosh/20080421)

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] <>; 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 via email to

[Prev in Thread] Current Thread [Next in Thread]