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: A way to make Emacs completely disregard a key
Date: Mon, 26 Jul 2010 21:54:24 -0600	[thread overview]
Message-ID: <i2ll97$335$1@dough.gmane.org> (raw)
In-Reply-To: <AANLkTim+tumTddcU+dBRy4tUt13G2_xqvDxJ06FPWot=@mail.gmail.com>

Deniz Dogan wrote:
> I have undefined <f2> so that it is unbound. But still I get "<f2> is
> undefined" in the echo area and a beep, which I don't want. I know I
> can just bind this to a no-op command instead,

(global-set-key (kbd "<f2>") 'ignore)

> but is there a smart
> way to make Emacs completely disregard any hit of the <f2> key? So
> e.g. C-x <f2> C-s would be interpreted as C-x C-s, since <f2> is not
> even snapped up by Emacs.

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

(info "(elisp)Special Events")

-- 
Kevin Rodgers
Denver, Colorado, USA




  reply	other threads:[~2010-07-27  3:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23  9:49 A way to make Emacs completely disregard a key Deniz Dogan
2010-07-27  3:54 ` Kevin Rodgers [this message]
     [not found] <mailman.4.1279878594.17590.help-gnu-emacs@gnu.org>
2010-07-23 18:35 ` Elena
2010-07-24  0:06   ` Tim X
2010-07-24 14:10     ` Elena

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='i2ll97$335$1@dough.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.