[plt-scheme] vi mode and editor questions

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Sat Nov 22 17:04:22 EST 2008

>   
>> 2. I would like to capture the control key for ctrl-d and whatnot but most
>> ctrl-# key bindings do something in drscheme and when ctrl-# keys that
>> aren't bound in drscheme don't seem to make their way to my editor.
>>     
>
> You should be able to catch them in on-char, if not on-default-char.
>
>   
That doesn't seem to be the case. I am on Ubuntu.
(define/override (on-char evt)
           (printf "Control ~a char ~a\n" (send evt get-control-down)
                   (send evt get-key-code)))

If I press the control key I see

Control #f char control

Then with
(define/override (on-default-char evt)
           (send (car modes) do-char evt))

Where do-char does the same printing as on-char I don't get any control 
key events. Further more if I press ctrl-s the save box comes up but for 
vi mode I would like to disable things like this.


Posted on the users mailing list.