| Home ⋅ All Commands ⋅ Grouped Commands ⋅ List of all modules ⋅ FAQ (on line) |

## Stroke

`Stroke` [(`window`)] `Sequence` `Button` `Context` `Modifiers` `Function`

Binds a mouse stroke sequence to a specified fvwm command, or removes the binding if `Function` is '-'. The syntax is the same as for a Mouse binding except that `Sequence` is inserted in front of the button number and a value of 0 for `Button` concerns the StrokeFunc command. The `Context` and `Modifiers` fields are defined as in the Mouse binding. However, only the 'R' Context really works (if you want to use other contexts you need to use the StrokeFunc below).

Strokes sequences are defined in a telephone grid like this:

     1  2  3

     4  5  6

     7  8  9

or in a numeric pad grid like this:

     7  8  9

     4  5  6

     1  2  3

The telephone grid is used by default, to use the numeric pad grid you should begin the sequence with a 'N'. Note that a complex motion may produce several different sequences (see the "netscape" example below to handle such motion). Moreover, sequences are limited to 20 elements (with the present version of libstroke), however, in practice it is preferable to use sequence with less than 12 elements.

Because of the default button menu in fvwm, you may need to remove a mouse button binding (using an empty action) before using the stroke

    Mouse 3 R N

Also, you can still use the stroke "sequence 0" to simulate a click:

    Stroke 0 3 R N Menu WindowList Nop

The following example starts xterm when the mouse drags an 'I' on the root window with button 3 pressed down:

    Stroke 258  3  R  N  Exec exec xterm

An example for Netscape:

    Stroke 7415963    3  R  N  Exec exec netscape
    Stroke 74148963   3  R  N  Exec exec netscape
    Stroke 74158963   3  R  N  Exec exec netscape
    Stroke 7418963    3  R  N  Exec exec netscape
    Stroke 415963     3  R  N  Exec exec netscape

You may prefer to use the numeric pad grid since you have such a grid on your machine. Here an example:

    Stroke N78963214   3  R  N FvwmForm FvwmForm-QuitVerify
    Stroke N789632147  3  R  N FvwmForm FvwmForm-QuitVerify

This example starts the "QuitVerify" form if you draw a box that begins in the top left corner.

Note: You need libstroke installed and fvwm compiled with stroke support. libstroke can be obtained at http://www.etla.net/~willey/projects/libstroke/

fvwm 2.6.8