[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unreading a prefix key
From: |
rgb |
Subject: |
unreading a prefix key |
Date: |
10 Nov 2006 08:34:00 -0800 |
User-agent: |
G2/1.0 |
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
- unreading a prefix key,
rgb <=