[racket] keybinding help needed

From: Bill Richter (richter at math.northwestern.edu)
Date: Wed Jul 28 22:35:58 EDT 2010

    These methods are documented as part of the editor<%> interface, fwiw.

Thanks, Robby.  Much of the info I needed was in the manual, but I
don't see how anyone could have found this info starting at the
DrRacket node 3.8 Defining Custom Shortcuts, which only has a link to
Racket\doc\gui\keymap_.html (keymap%), and only has this example
  (keybinding "c:a" (lambda (editor evt) (send editor insert "!"))) 

Searching in Help Desk for `editor<%>' took me to 
/Racket/doc/gui/editor___.html, which contains

(send an-editor cut [extend? time]) -> void?
(send an-editor redo) -> void?

I never would have thought to make that search, but I suppose that
should tell me that these are good keybindings:
(keybinding "f7" (lambda (editor evt) (send editor redo))) 
(keybinding "f10" (lambda (editor evt) (send editor cut))) 

A more sensible search would have been for select-forward-sexp, which
took me to Racket/doc/framework, which reads

(send a-scheme:text select-forward-sexp start) -> |#t| 
  start : exact-integer 

I suppose that should have told me that this was a good keybinding:
(keybinding "f2" (lambda (editor evt) (send editor select-forward-sexp))) 

I still don't see how to bind the function Show Definitions (C-e) to a
function key, as I can't find the actual name of the command.  Run
(C-t) is the command I'm more interested in, and I can't bind that
either, but the manual says that Run is bound to F5 anyway :)


Posted on the users mailing list.