[plt-scheme] keybinding and menus

From: Laurent (laurent.orseau at gmail.com)
Date: Tue Dec 1 12:44:10 EST 2009

Thanks!

On Tue, Dec 1, 2009 at 17:16, Robby Findler <robby at eecs.northwestern.edu>wrote:

> On Wed, Nov 25, 2009 at 9:39 AM, Laurent <laurent.orseau at gmail.com> wrote:
> > First, in order to rebind some keys defined for menus, the option
> > "keybindings in menus" in menu preferences/editing/general must be
> disabled
> > (for me, and it seems that this behavior is different for other people
> (?)).
> > My quick guess is that the menus keybindings are defined after
> "mykeys.ss"
> > file is loaded, which is not what I want.
> > This forces me to redefine some of the bindings of the menus by hand...
>
> I've fixed drscheme so that user-defined keybindings override the menu
> keys (in SVN).
>

great, that will solve many problems.

#lang s-exp framework/keybinding-lang
>
> (define (get-frame obj)
>  (cond
>    [(is-a? obj editor<%>)
>     (send (send obj get-canvas) get-top-level-window)]
>    [else
>     (send obj get-top-level-window)]))
>
> (keybinding "c:n" (λ (obj evt) (send (get-frame obj) open-in-new-tab #f)))
>

I've been looking for that with no success...


> I think you might just need the ?: prefix to make things work (see the
> docs for map-function for more on that). This is a messy area that
> needs to be cleaned up at some point, but one of the above should be
> made to work. I don't have a windows machine (or a french keyboard!)
> to try these things out so I'm kind of stuck on this one.
>

Ha, that is what "?:" is for, then.
I'll give feedback when I can.

Sorry for the delay in replying.
>

No problem. My cornucopia cannot give me extra time either.

Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20091201/854163e6/attachment.html>

Posted on the users mailing list.