[Top][All Lists]

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

Re: unreading a prefix key

From: rgb
Subject: Re: unreading a prefix key
Date: 14 Nov 2006 06:26:52 -0800
User-agent: G2/1.0

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;

pointed me to this solution which does seem to work.

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

reply via email to

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