help-emacs-windows
[Top][All Lists]
Advanced

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

[h-e-w] Re: representation of key mapping in custom menu


From: Dr Francis J. Wright
Subject: [h-e-w] Re: representation of key mapping in custom menu
Date: Sun, 9 Sep 2001 19:44:03 +0100

From: "Brandon Hall" <address@hidden>
To: <address@hidden>
Sent: Friday, September 07, 2001 9:32 PM
Subject: representation of key mapping in custom menu


> I have a custom menu bar that is not behaving the way I'd like it to.
> Specifically, for a certain menu entry, it displays the key sequence "C-c
> TAB", but I'd prefer it to show "C-c C-i" for mnemonic reasons.
>
> My code is
>
>     (define-key map "\C-c\C-i" 'usan-calc-id)
>     (define-key map [menu-bar u calc-id]
>       '("Interpolate report ID" . usan-calc-id))
>
> Any suggestions greatly appreciated.


You can specify any keyboard equivalent you want using the :keys extended
menu item property (which is documented in the ELisp manual).  This example
just puts a dummy entry at the top of the Help menu, but you should be able
to modify it to do what you want.

(define-key menu-bar-help-menu [Test]
  '(menu-item "Test" undefined
       :keys "C-c C-i"))

Francis




reply via email to

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