Binding cmd-e on Mac?
I've been trying to make Cmd-e on Mac set up the current find string.
I've written an editor command that will do that, but it doesn't want
to bind to that key.
Here's the command:
(defcommand "Use Selection for Find" (p)
"Makes the selection the current find string"
"Makes the selection the current find string"
(declare (ignore p))
(when (region-active-p)
(let ((pt-string (points-to-string (current-point) (current-
mark))))
(push pt-string lispworks-tools::*editing-interface-find-
strings*))))
and I'm binding it with:
(mac-bind-key "Use Selection for Find" "Hyper-e")
in my lispworks-init.lisp. There seems to be something special about
Cmd-keys. command-to-key reports the binding correctly, but I can't
type Cmd-e for key-to-command.
I don't want to set the preference to use Cmd as Meta, either. I think
that would be too confusing.
Ideally, I'd rather add a menu item named "Use Selection for Find",
but I don't see how to do that.
Any ideas or suggestions?
Thanks.
- Stoney
--
Stonewall Ballard
stoney@sb.org http://stoney.sb.org/