[plt-scheme] Keybinding question

From: Dave Gurnell (d.j.gurnell at gmail.com)
Date: Fri Jan 16 08:06:17 EST 2009

Hi all,

I'm trying to set up an alternative keybinding for the "collapse- 
space" command (it defaults to "ESC;space" on OSX - I'd like to have a  
single press).

So far I've got the code below. I think it doesn't work because  
"collapse-space" isn't a registered function in the keymap:

   (module mykeys (lib "keybinding-lang.ss" "framework")

     (require drscheme/tool-lib)

      (lambda (editor event)
        (message-box "Hi" (format "~a" (send (send editor get-keymap)  
        (raise #f)
        (send (send editor get-keymap) call-function "collapse-space"  
editor event #t))))

I imagine I'm probably going about this the wrong way. I've tried a  
couple of approaches and I always fall at the getting-hold-of-collapse- 
space hurdle.

Can anyone help?

Many thanks,

-- Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090116/75945b54/attachment.html>

Posted on the users mailing list.