<div><br></div>Thank you; that's great. I'm most of the way<div>there now.</div><div><br></div><div>Still, I'm finding the text% documentation</div><div>tough sledding; the tools seem lower-level</div><div>than I need.</div>
<div><br></div><div>Is there a keybinding file somewhere for</div><div>emacs commands? I think changing the</div><div>actual keystrokes in that file would be the</div><div>easiest way for me to do what I want.</div><div>
<br></div><div>Thanks,</div><div><br></div><div>--DGK<br><br><div class="gmail_quote">On Sat, Sep 10, 2011 at 2:22 PM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div>At Sat, 10 Sep 2011 12:56:29 -0700, "David G. Kay" wrote:<br>
> Hi, everyone;<br>
><br>
> I'd like to rebind some of the DrRacket<br>
> editor keys. (I'm trying to reproduce the<br>
> idiosyncratic editor layout I'm used to;<br>
> it has an emacs flavor but with different<br>
> keys.)<br>
><br>
> To start, I just want to map ^t to move<br>
> up a line, ^v to move down, ^f to move<br>
> left, and ^g to move right.<br>
><br>
> I created this file ("keys.rkt"):<br>
><br>
> #lang s-exp framework/keybinding-lang<br>
><br>
> (keybinding "c:t" (lambda (editor evt) (send editor previous-line)))<br>
> (keybinding "c:v" (lambda (editor evt) (send editor next-line)))<br>
> (keybinding "c:f" (lambda (editor evt) (send editor backward-character)))<br>
> (keybinding "c:g" (lambda (editor evt) (send editor forward-character)))<br>
><br>
><br>
> I add the file using "Add User-defined<br>
> Keybindings" in DrRacket. But I get<br>
> this message as soon as I type one of<br>
> my rebound keys:<br>
><br>
> Error running keybinding .../Scheme/keys.rkt:18:18<br>
><br>
> send: no such method: previous-line for class: ...engine/test-tool.scm:36:6<br>
><br>
><br>
> It's complaining about the previous-line<br>
> method, but that's listed in section 7<br>
> (Editor Functions) of the Racket Graphical<br>
> Interface Toolkit manual:<br>
> <a href="http://docs.racket-lang.org/gui/Editor_Functions.html?q=Editor_Functions&q=edit" target="_blank">http://docs.racket-lang.org/gui/Editor_Functions.html?q=Editor_Functions&q=edit</a><br>
> or%25&q=forward-select-word&q=key%20bindings<br>
<br>
</div></div>I can see how it's confusing, but that isn't a list of methods. It's a<br>
list of strings that are mapped to functions in a keymap%, where the<br>
string is eventually converted to a function through the<br>
`call-function' method of keymap%. The extra level of indirection is an<br>
ugly artifact of the days when parts of the GUI toolkit were<br>
implemented in C++.<br>
<br>
<br>
For text-editor methods, look here:<br>
<br>
<a href="http://docs.racket-lang.org/gui/text_.html" target="_blank">http://docs.racket-lang.org/gui/text_.html</a><br>
<br>
I think you want to use the `move' method.<br>
<br>
</blockquote></div><br>
</div>