CLIM mail archive

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

Trouble with keyboard accelerator



    Date: Fri, 24 Apr 1992 10:19 EDT
    From: Brent Reeves <brentr@sigi.cs.colorado.edu>


     I'm running Genera 8.1 and CLIM version 27 and
     can't get keyboard accelerators to work.  After the
     following command is defined, when I press
     control-r or control-shift-r, the machine just
     beeps.  And the "recreate" command does not show up
     in the command table.

     (define-network-design-command (com-recreate
				    :keystroke #\c-r
				    :menu nil)
	()
      (when *most-recent-palette-item*
	(com-create-copy *most-recent-palette-item*)))

If you have an interactor pane in your frame, CLIM does not defaultly
read keystroke accelerators.  You need to tell it to do so explicitly.
Specialize your READ-FRAME-COMMAND method to call READ-COMMAND, and
supply :READ-KEYSTROKES T.

The behavior is such because otherwise it would be too easy to have
keytstroke accelerators clash with normal printing characters.

     -brent

    ----------------------------------------------------------------
    Brent Neal Reeves    brentr@cs.colorado.edu       (303) 492-1218


References:

Main Index | Thread Index