[Openmcl-devel] menu

Arthur W Cater arthur.cater at ucd.ie
Fri Apr 17 06:38:45 PDT 2009

There's easygui:add-topbar-item for adding a menu item to the application menu.
Allowing for keyboard shortcuts for such an item is a ToDo.
There may be issues to do with conflicts between shortcuts.
If you're happy to ignore such problems, making versions for yourself of
easygui:add-topbar-item and easygui:add-menu-item with an extra argument,
and where the third mention of
is replaced with
   (ccl::%make-nsstring <your-shortcut-sequence-goes-here>)
should (I think) allow keyboard shortcuts too.
(look in ccl/examples/cocoa/easygui/views.lisp)
I do not know how you'd put command- or control- keys into these strings,
I'm sure there's a way ... 


----- Original Message -----
From: Joakim Sandgren <joakim at joakimsandgren.com>
Date: Friday, April 17, 2009 11:20 am
Subject: Re: [Openmcl-devel] menu
To: Raffael Cavallaro <raffaelcavallaro at mac.com>
Cc: Openmcl-devel Devel <openmcl-devel at clozure.com>

> I'm sorry. I didn't talk about re-mapping the keyboard but to add a command to execute a action, in this case one of my own functions... 

i found a add-menu-item in the coca ide folder (i think?) but I dont know really how this works and I have not been able to add an action to the command...

> Thank You

> SIncerely

> Joakim

> Le 13 avr. 09 à 18:22, Raffael Cavallaro a écrit :

> On Apr 12, 2009, at 4:49 PM, Joakim Sandgren wrote:

> Hi,
> How hard is it to assign a command (mac leopard ide 1.3) for a  
> function ?
> in old mcl I added key commands in the menus to do things...

> It's not very hard. I have this in my init (which I have to load  
> manually of course, but that's another IDE enhancement request…)

> (in-package :hemlock)

> (bind-key "Forward Word" #k"meta-rightarrow")
> (bind-key "Select Forward Word" #k"meta-shift-rightarrow")
> (bind-key "Forward Form" #k"control-meta-rightarrow")
> (bind-key "Select Forward Form" #k"control-meta-shift-rightarrow")

> (bind-key "Backward Word" #k"meta-leftarrow")
> (bind-key "Select Backward Word" #k"meta-shift-leftarrow")
> (bind-key "Backward Form" #k"control-meta-leftarrow")
> (bind-key "Select Backward Form" #k"control-meta-shift-leftarrow")

> You can see ccl/cocoa-ide/hemlock/src/binding.lisp for the standard  
> bindings and how  to modify them.

> For thinks appearing in menus you can use the keyboard shortcuts tab  
> of apple's keyboard and mouse preference pane.

> warmest regards,

> Ralph

> Raffael Cavallaro, Ph.D.
> raffaelcavallaro at mac.com

> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

> Joakim Sandgren
> joakim sandgren musik
> 42, rue de Maubeuge
> 75009 Paris
> France
> +33 (0)1 45 26 43 90
> info at joakimsandgren.com
> http://www.joakimsandgren.com

> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20090417/12e0a97d/attachment.htm>

More information about the Openmcl-devel mailing list