CLIM mail archive


keystroke accelerators

    Date: Thu, 12 Dec 1991 06:22 EST
    From:     Rainer Koenig <>

    I want to use the keystroke accelerator option of

    Therefore I do the following:

    (define-application-command (com-my-command :menu "My Command"
						:name "My Command"
						:keystroke #\c-d)

    When I now use CTRL-d in my application it beeps, but the body is not evaluated

    Any hints?

If your application frame has any pane of type :INTERACTOR, CLIM's
default behavior is for the command reader *not* to use keystroke
accelerators.  This is because keystroke accelerators can interact with
command lines in unpredictable ways.  For example, suppose that you had
chosen #\D as the accelerator; then the user would not be able to type
any command line starting with the letter D.

What you need to do is provide a method for READ-FRAME-COMMAND for your
application frame as follows:

(defmethod read-frame-command ((frame <your-frame>) &key (stream *query-io*))
  (read-command (frame-command-table frame) :stream stream :use-keystrokes t)) 

After doing that, everything should just work.

Main Index | Thread Index