all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "rgb" <rbielaws@i1.net>
Subject: Re: unreading a prefix key
Date: 14 Nov 2006 06:24:07 -0800	[thread overview]
Message-ID: <1163514247.267218.97590@i42g2000cwa.googlegroups.com> (raw)
In-Reply-To: <1163176440.006120.192850@e3g2000cwe.googlegroups.com>

rgb wrote:
> When I press [C-apps] I want it to be the same as pressing [?\C-\S-c].
> I do something similar with [apps] being the same as [?\C-x] like this:
> (global-set-key [apps]     (lookup-key global-map [?\C-x]))
>
> I've tried lots of things but since C-c is defined in mode keymaps
> rather than the global map the solution isn't as straightforward.
> Complicating things, C-apps isn't a 'normal' key so this doesn't
> work
>
> (keyboard-translate C-apps ?\C-\S-c)
>
> My initial thoughts were that this should work.
>
> (global-set-key [C-apps]   (lambda ()(interactive)
>                              (push [?\C-\S-c] unread-command-events)))
>
> But it doesn't and I don't see any clue why in the doc.
> Any ideas on how this can be done?
>

Thanks to Kevin Rodgers, who, in this post
http://groups.google.com/group/gnu.emacs.help/msg/593045cbd3af247e?hl=en&

pointed me to this solution which does seem to work.

(define-key function-key-map [C-apps] [?\C-\S-c])

  reply	other threads:[~2006-11-14 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10 16:34 unreading a prefix key rgb
2006-11-14 14:24 ` rgb [this message]
2006-11-14 14:26 ` rgb

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=1163514247.267218.97590@i42g2000cwa.googlegroups.com \
    --to=rbielaws@i1.net \
    /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.