Skip to content

Custom border lock zones #458

Description

@Trial4life

Feature request: per-segment border lock zones

Summary

I'd like to request the ability to define locked segments on a border, specific vertical (or horizontal) ranges of a screen edge where the cursor cannot cross to the adjacent monitor, while the rest of the edge remains freely passable as usual.

Use case

My two monitors are side by side. I want the cursor to transition freely between them, but only through a defined "passage" in the middle portion of the shared edge. The top and bottom portions of the edge should act as a hard wall.

This turns out to be extremely useful in practice:

  • Taskbar corners: quickly swiping the mouse to the bottom-left or bottom-right corner to hit the Start button, the Show Desktop button, or close/minimize buttons on maximized windows, without accidentally landing on the adjacent monitor. With infinite scrolling enabled, this is nearly impossible at high mouse speed.
  • Window controls: throwing the mouse fast toward a screen edge to hit UI elements near the border (a common power-user habit) becomes unreliable because the cursor overshoots onto the other screen.
  • General muscle memory: users naturally move the mouse fast and rely on screen edges as physical stops. LBM removes this safety net entirely on the crossing axis.

Relationship to the default Windows behavior LBM overrides

It's worth noting that stock Windows already implements a small version of this concept: by default, there is a ~5 pixel sticky corner zone at the corners of each monitor that slightly resists cursor movement, preventing accidental crossings at the very edges. LBM disables this behavior when it takes over mouse movement. A per-segment lock would restore and extend that concept in a configurable, deliberate way.

What I'm trying to build (and why I need LBM's cooperation)

I wrote a small Python/C utility that installs a WH_MOUSE_LL hook and uses ClipCursor to enforce a hard wall on the portions of the border outside the allowed passage zone. It works perfectly when LBM is not running (I've attached a screenshot of the utility with the debug lines turned on).

With LBM active, however, the two tools conflict: LBM moves the cursor in a way that races with or bypasses my ClipCursor rect, causing the cursor to flicker between the two monitors at the boundary. I was unable to resolve this conflict from the outside regardless of hook priority or timer resolution, which is what led me here.

Proposed solutions (in order of preference)

  1. Native LBM feature: add a per-segment resistance or lock option in the border configuration UI, similar to how border resistance works today, but applicable to a sub-range of the edge defined by Y (or X) coordinates in pixels or millimeters.

  2. TCP API / IPC command: if the daemon already listens on a local TCP port (I can see it does via Process Monitor), expose a documented command that external tools can send to temporarily suppress crossing on a specific border segment. This would allow third-party tools to integrate cleanly.

  3. Documentation of the movement mechanism: even knowing exactly which Win32 call LBM uses to reposition the cursor (SetCursorPos, SendInput, or something else) would allow external tools to interoperate correctly.

Environment

  • Windows 11
  • Two monitors: HP (smaller, offset lower) on the left, MSI on the right
  • LBM configured with physical size matching for smooth transitions

Thanks for the great software, the physical-size-aware crossing is genuinely excellent and I'd love to keep using it alongside this kind of boundary control.

Image

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