<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>I'm trying to set up an alternative keybinding for the "collapse-space" command (it defaults to "ESC;space" on OSX - I'd like to have a single press).</div><div><br></div><div>So far I've got the code below. I think it doesn't work because "collapse-space" isn't a registered function in the keymap:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp;(module mykeys (lib "keybinding-lang.ss" "framework")</span><br><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp;</span><br><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp; &nbsp;(require drscheme/tool-lib)</span><br><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp;</span><br><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp; &nbsp;(keybinding</span><br><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp; &nbsp; ":f2"</span><div><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp; &nbsp; (lambda (editor event)</span><br><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp; &nbsp; &nbsp; (message-box "Hi" (format "~a" (send (send editor get-keymap) get-chained-keymaps)))</span><br><span class="Apple-style-span" style="font-family: Monaco; ">&nbsp;&nbsp; &nbsp; &nbsp; (raise #f)</span><br><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp; (send (send editor get-keymap) call-function "collapse-space" editor event #t))))</font><br><font class="Apple-style-span" face="Monaco"><br></font><div></div></div></div><div>I imagine I'm probably going about this the wrong way. I've tried a couple of approaches and I always fall at the getting-hold-of-collapse-space hurdle.</div><div><br></div><div>Can anyone help?</div><div><br></div><div>Many thanks,</div><div><br></div><div>-- Dave</div><div><br></div></body></html>