[plt-scheme] Keybinding question

From: Grant Rettke (grettke at acm.org)
Date: Fri Jan 16 14:24:57 EST 2009

Hi Dave,

> I'm trying to set up an alternative keybinding for the "collapse-space"

I tried you code and it didn't work as you wanted, but I widdled it
down to this:

(module dave-keys (lib "keybinding-lang.ss" "framework")

  (define (test editor event)
    (send (send editor get-keymap) call-function "collapse-space"
editor event #t))

  (keybinding ":f2" test))

and found that it did work on 4.1.2.

I did try setting try-chain? to #f to check if any exceptions were
thrown, and in the process found that DrScheme responds better to
changes in the keymap by restarting completely rather than just adding
and removing the keymap after each change. That sounds like what you
experienced.


Posted on the users mailing list.