[Openmcl-devel] hash key on UK mac keyboards

Glen Foy lisp at clairvaux.org
Thu Jun 18 09:35:10 PDT 2009


On Jun 18, 2009, at 10:21 AM, Tim Bradshaw wrote:

> [Sorry, this may be not appropriate for this list: I would ask on IRC
> but have given up on Mac IRC clients for now...]
>
> Hi, I have a mac with a UK keyboard, and I'm using 1.3 but not fetched
> by SVN (the IDE-building instructions did not work for me so I just
> fetched the ftpable one). To type hash on one of these, you say
> option-3. (shift-3 is pound-sign).  Of course, you can't type this if
> the IDE is set up to bind option to meta, and not being able to type
> hash is fairly annoying in CL.  And of course, not having a meta key
> is also pretty irritating.
>
> I think that the answer is probably to work out how to bind shift-3 to
> insert a hash, and I can probably do that.  But it's a very (*very*)
> long time since I used Hemlock, so if anyone else has seen this
> problem and can assist me being lazy, that would be much appreciated

Something like this might be what you want:

(hi::defcommand "Insert Hash" (p)
   "Insert # on a UK keyboard."
   (let ((char #\#))
     (if (and p (> p 1))
       (hi::insert-string
        (hi::current-point-for-insertion)
        (make-string p :initial-element char))
       (hi::insert-character (hi::current-point-for-insertion) char))))

(hi::bind-key "Insert Hash" #k"control-3")

You can, of course, bind it to whatever keys you want.



More information about the Openmcl-devel mailing list