<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; "> (module mykeys (lib "keybinding-lang.ss" "framework")</span><br><span class="Apple-style-span" style="font-family: Monaco; "> </span><br><span class="Apple-style-span" style="font-family: Monaco; "> (require drscheme/tool-lib)</span><br><span class="Apple-style-span" style="font-family: Monaco; "> </span><br><span class="Apple-style-span" style="font-family: Monaco; "> (keybinding</span><br><span class="Apple-style-span" style="font-family: Monaco; "> ":f2"</span><div><span class="Apple-style-span" style="font-family: Monaco; "> (lambda (editor event)</span><br><span class="Apple-style-span" style="font-family: Monaco; "> (message-box "Hi" (format "~a" (send (send editor get-keymap) get-chained-keymaps)))</span><br><span class="Apple-style-span" style="font-family: Monaco; "> (raise #f)</span><br><font class="Apple-style-span" face="Monaco"> (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>