* unreading a prefix key
@ 2006-11-10 16:34 rgb
2006-11-14 14:24 ` rgb
2006-11-14 14:26 ` rgb
0 siblings, 2 replies; 3+ messages in thread
From: rgb @ 2006-11-10 16:34 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: unreading a prefix key
2006-11-10 16:34 unreading a prefix key rgb
@ 2006-11-14 14:24 ` rgb
2006-11-14 14:26 ` rgb
1 sibling, 0 replies; 3+ messages in thread
From: rgb @ 2006-11-14 14:24 UTC (permalink / raw)
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])
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: unreading a prefix key
2006-11-10 16:34 unreading a prefix key rgb
2006-11-14 14:24 ` rgb
@ 2006-11-14 14:26 ` rgb
1 sibling, 0 replies; 3+ messages in thread
From: rgb @ 2006-11-14 14:26 UTC (permalink / raw)
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])
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-14 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10 16:34 unreading a prefix key rgb
2006-11-14 14:24 ` rgb
2006-11-14 14:26 ` rgb
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.