[racket] Keyboard input in DrRacket

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Mar 18 08:37:26 EDT 2011

How about this? Make a file somewhere, put the code below in it and
then use edit|keybindings|add user-defined keybindings... and point to
the file.

You will probably have to change the "c:c;c:t" to something that isn't
used on your keyboard; that one is reasonable on a mac (where I'm
working this morning), but probably not under windows.

Search for "map-function" (a method of keymap%) in the docs to learn
the notation for those.

#lang s-exp framework/keybinding-lang
(keybinding "c:c;c:t"
            (λ (txt evt) (send txt insert "~")))


Posted on the users mailing list.