CLIM mail archive
[Prev][Next][Index][Thread]
problem with keystroke accelerators
Date: Wed, 9 Dec 1992 09:03 EST
From: Vincent Keunen <nrb!keunen@relay.eu.net>
CLIM 28.5 (1.1) and Genera 8.1.1
I want to be able to zoom a graphic by typing h-z for example. The
zoomed graphic needs to be centered on the pointer position.
So I tried the following code, but it doesn't work when I press h-z (I
tried other keys too, h- and c- ones) but it works when I type the
command in full... (command: Zoom In On Pointer)
Do you have a READ-FRAME-COMMAND method that calls READ-COMMAND with
:USE-KEYSTROKES T?
If there were a CLIM FAQ, this would surely be on it.
Why does it beep when I press h-z?
(define-nanesse-network-configuration-command
(com-zoom-in-on-pointer :name t :keystroke #\h-z) ()
(clos:with-slots (echelle-x
echelle-y)
(nanesse-frame)
(multiple-value-bind (x y)
(clim:stream-pointer-position* (nanesse-network-display))
(format (frame-query-io (nanesse-frame))
"~&pointer x = ~a; pointer y = ~a" x y)
(setf echelle-x
(* echelle-x 1.5))
(setf echelle-y
(* echelle-y 1.5))
(clim:window-clear *standard-output*)
;;(set-display-center x y)
(draw-network-map (nanesse-frame) (nanesse-network-display)))))
Following remarks on page 297, I tried adding the following (although I
don't need default values because my command doesn't have any arguments
at all), but it doesn't change anything:
(clim:add-keystroke-to-command-table
'nanesse-network-configuration
#\hyper-z :command '(com-zoom-in-on-pointer))
As an aside problem, when I try with :keystroke #\c-t, I get an error:
This is because the input editor is intercepting your control-T and
trying to transpose two nonexistent characters. The bug in CLIM that
causes this to blow out has been fixed in CLIM 2.0
Trap: The second argument to the EQUAL-NUMBER-NO-POP instruction, NIL, was not a number
The following specials have been rebound; use :Show Standard Value Warnings for details:
*PACKAGE*
While in the function CLIM::FORWARD-OR-BACKWARD CLIM::COM-IE-TRANSPOSE-CHARACTERS (:PROP
ERTY SYS:DTP-SYMBOL SI:INTERPRETER-FUNCTION)
CLIM::FORWARD-OR-BACKWARD
Arg 0 (CLIM::INPUT-BUFFER): #<ARRAY 100 fill-pointer 0 2202515655>
Arg 1 (CLIM::START-POSITION): NIL
Arg 2 (CLIM::REVERSE-P): T
Arg 3 (CLIM::PREDICATE): #<Compiled function CLIM::TRUE 22041355573>
s-A, : Supply replacement argument
s-B: Supply replacement argument, storing back into POSITION
s-C: Return 2 values from the EQUAL-NUMBER-NO-POP instruction
s-D: Retry the EQUAL-NUMBER-NO-POP instruction
s-E, : Return to Nanesse Network Configuration command level
s-F: Nanesse Network Configuration top level
s-G: Exit Nanesse Network Configuration
s-H: Exit process Nanesse Network Configuration
0,,
References:
Main Index |
Thread Index