CLIM mail archive

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

Detecting modifier keystrokes



    Date: Fri, 3 Sep 1993 16:46 EDT
    From: bha <@ada3.iasl.ca.boeing.com:bha@ata.boeing.com>

    > Date: Fri, 3 Sep 1993 14:23 -0400
    > From: Scott McKay <SWM@stony-brook.scrc.symbolics.com>
    > Mmdf-Warning:  Parse error in original version of preceding line at BBN.COM
    > 
    >     Date: Fri, 3 Sep 1993 13:23 EDT
    >     From: bha <@ada3.iasl.ca.boeing.com:bha@ata.boeing.com>
    > 
    >     CLIM 2.0beta2
    >     ACL 4.2beta2
    > 
    >     > Date: Thu, 02 Sep 93 16:20:12 -0700
    >     > From: Chris Richardson <cer@Franz.COM>
    >     > 
    >     > 
    >     > Checkout port-modifier-state and pointer-button-state
    >     > 
    >     > 
    > 
    >     OK.  That allows me to query to current state of the keyboard
    >     modifiers from anywhere in my application.
    > 
    >     Now, what I *really* want to do is drive clim:tracking-pointer with
    >     keyboard modifier state *changes*.  Maybe a clause in
    >     clim:tracking-pointer such as :keyboard-event (event) similar to
    >     :pointer-button-press (event) or change/modify the existing :keyboard
    >     clause to pass a keyboard event would be handy.  If the :keyboard
    >     clause was similar to the :pointer-button-press clause, one could then
    >     use clim:event-matches-gesture-name-p to match keyboard gestures,
    >     clim:keyboard-event-character to obtain the character and
    >     clim:event-modifier-state to query the modifier state in a manner
    >     consistent with pointer events.  The only problem might be -
    >     are/should modifier state *changes* delivered as events?
    > 
    > It would be useful to know what it is you are "really really" trying to
    > do.  If you are genuinely interested in tracking events as closely as
    > you say, it may be more effective to specialize one of the CLIM stream
    > pane classes and write your own HANDLE-EVENT methods on it.


    I "really, really, really" want to implement a set of pointer input
    mechanisms such as pointer-input-rectangle, pointer-input-line, etc.
    Then, in true MacDraw style, I want to use the shift key to enforce
    some constraint (such as constraint pointer-input-rectangle to return
    a square).  I also want these input mechanisms to scroll the viewport
    as required when one tracks the pointer at the edge of the window.

    So does clim:tracking-pointer use its own stream with specialized
    mechanisms for handle-event and "attach" it to the real stream in
    order to handle events in a specialized way?

No, you would have to make your own window class and add methods that do
this.  The original Silica in CLIM 0.9 had a more flexible "distributor"
mechanism that might have been able to do what you want, but it didn't
survive into CLIM 2.0 for various reasons.


Main Index | Thread Index