All Manuals > CAPI Reference Manual > 1 CAPI Reference Entries



Generic Function

Maybe capture a gesture by the non-focus-interface.


non-focus-maybe-capture-gesture non-focus-interface gesture => result



A non-focus-list-interface.


A gesture specifier.



A generalized boolean.

Method Signature

non-focus-maybe-capture-gesture ( non-focus-interface non-focus-list-interface) gesture


The generic function non-focus-maybe-capture-gesture needs to return non-nil if the gesture gesture was captured, which means it should not be processed any more, or nil if gesture was not captured.

gesture should be a gesture specifier, which is an object that can be coerced to a Gesture Spec by sys:coerce-to-gesture-spec .

The method on non-focus-list-interface does the following:

  1. If the gesture is Escape it calls non-focus-terminate on the non-focus window.
  2. It checks whether the gesture matches any of the gestures in the gesture-callbacks of the window. The gesture callbacks are either explicitly defined using the initargs :gesture-callbacks or :add-gesture-callbacks , or implicitly. By default, all the gestures that are used in in-place completion (see "In-place completion" in the CAPI User Guide ) are defined implicitly. These include Up , Down , PageUp , PageDown (selection in the list panel), Return (action), Control+Return and Control+Shift+Return (control of the filter). The implicitly defined gestures are affected by gesture-callbacks , filtering-gesture and filtering-toggle .
  3. If a match is found, it is invoked as described for gesture-callbacks in prompt-with-list-non-focus.

  4. If filtering is enabled, it checks if the gesture is captured by the filter. A gesture is captured by the filter if it is:

A plain graphic character.

It is inserted to the filter


The last character in the filter is deleted

One of the gestures which update the state of the filter (by default Control+Shift+R , Control+Shift+E , Control+Shift+C )

The state of the filter is updated.

In any case, where a gesture is captured by the filter the list panel is updated.

If the gesture is captured by one of the possibilities above, the method returns t , otherwise it returns nil .

See also


CAPI Reference Manual - 15 Dec 2011