[racket] separate keybindings for interaction vs. definition window

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Jan 14 07:54:29 EST 2011

Check and see if the text% object is drracket:rep:text<%>, I believe.

Robby

On Thu, Jan 13, 2011 at 11:43 PM, Benjamin Rahn <benjamin.rahn at gmail.com> wrote:
> I'm creating some custom key bindings.  Is there a way to make the key
> bindings different for the interaction frame vs. the definitions window?
>
> Specifics: I would like to use the up/down keys (with no modifiers) to move
> back and forth through expressions that have been previously entered into
> the interaction window.  I have a custom keybindings file (below) does this.
>
> However, it simultaneously disables the up/down arrows in the definitions
> window, which is of course a deal-breaker.
>
> Is there a way I can use these keybindings in the interaction window, but
> leave the definitions window behavior unchanged?
>
> Thanks!
>
> -Ben
>
>
>
> ***********
>
> #lang s-exp framework/keybinding-lang
>
> ; I'm sure there's a less verbose way to achieve the same results, comments
> welcome.
>
> (keybinding ":down" (lambda (editor event)
>  (send
>    (send editor get-keymap)
>    call-function
>    "put-next-sexp"
>    editor event #t)))
>
> (keybinding ":up" (lambda (editor event)
>  (send
>    (send editor get-keymap)
>    call-function
>    "put-previous-sexp"
>    editor event #t)))
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>


Posted on the users mailing list.