CLIM mail archive

[Prev][Next][Index][Thread]

Support for special keys



CLIM 1.1
Allegro CL 4.1

I have a vague recollection of this topic being discussed before, but I couldn't
find any references in my CLIM archives.  Does anyone know how to get the End
key to work under CLIM 1.1 in Allegro CL 4.1?  Preferably on both the SPARC and
SGI platforms.  The following code makes the End key work under both MCL and
LispWorks:


(in-package "CLIM")


;;; Enables the given character to serve as an activation character and
;;; to invoke COM-EXIT-AVV as #\End does under Genera.  (Based upon the
;;; CLIM 1.1 source files SYS:CLIM;CLIM;INTERACTIVE-DEFS.LISP and
;;; SYS:CLIM;CLIM;ACCEPT-VALUES.LISP from Genera 8.1.1.)

(defun add-end-character (character)
  (pushnew character *standard-activation-characters*)
  (add-keystroke-to-command-table 'accept-values character
                                  :command 'com-exit-avv
                                  :errorp nil)
  character)


;;; The key labelled End generates the #\End character under MCL and
;;; LispWorks.

#+(or MCL LispWorks)
(add-end-character #\End)


However, not only is there no #\End character in ACL, but it seems that the End
key doesn't even generate a character visible from Lisp!  Given that #\c-d is a
semi-standard Unix end-of-file marker, I would be happy if I could hack some
sort of keymap somewhere so that the End key would generate a #\c-d character.
Unfortunately, I'm fairly Unix-challenged.  Can one of you gurus please help?

On a related topic, how does one abort a running computation in ACL?  I see that
the variable CLIM:*ABORT-CHARACTERS* contains the single character #\c-\z, but
if I type (DOTIMES (N 100000) (* N N)) and then try to stop the loop, nothing
happens until the loop finishes, at which time I see something like:

  Error:  Abort event #\CONTROL-\z seen.

I'm wrapping CLIM::CATCH-ABORT-GESTURES around the top-level loop.

Thanks for any help!


Philip L. Stubblefield                                         415/325-7165
Rockwell Palo Alto Laboratory                        phil@rpal.rockwell.com


Follow-Ups:

Main Index | Thread Index