[plt-scheme] vi mode and editor questions

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat Nov 22 17:25:21 EST 2008

On Sat, Nov 22, 2008 at 4:04 PM, Jon Rafkind <workmin at ccs.neu.edu> wrote:
>
>>
>>>
>>> 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.

I'm sorry -- that sounds like you do get the key events in on-char
(and not in on-default-char). What did you want to happen?

Robby


Posted on the users mailing list.