Skip to content

Make the gesture configurable: modifier key, mouse button, threshold #5

Description

@refaim

Asked for on the Far forum right after 1.2.0: a user would like the drag to start with the left button only while Left Ctrl is held, the way the DND plugin can be set up, so that plain left-button drags stay Far's own. Others will want the opposite, or the right button off, or a different distance before the drag starts. Today everything is hard-coded: the left and the right button both start a drag, no modifier key is looked at, the threshold is 3 cells.

What a first version could offer

  • a modifier key the drag requires: none / Ctrl / Alt / Shift, left or right one. It is in MOUSE_EVENT_RECORD::dwControlKeyState on the press, so the check is free; without the modifier the plugin does not arm at all and Far sees every event exactly as it does without Burlak;
  • which buttons start a drag: left, right, both;
  • the threshold in cells.

Plumbing

A PluginConfig entry in GetPluginInfoW plus ConfigureW for the dialog, values kept through SettingsControl, read at SetStartupInfoW and again when the dialog closes. The gesture has a single arming point (Gesture::arm / OnPanel), so the gate goes there and nothing else in the state machine changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions