Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Keyboard focus follow movetoworkspace

Open spikespaz opened this issue 3 years ago • 7 comments
trafficstars

I have follow_mouse = 2, where keyboard focus stays with the focused window but mouse focus moves with the mouse. The only reason I want this is so that my scroll wheel works on the browser, but I can still type in the editor on another monitor.

Unfortunately I've noticed some issues with this. The Rofi window looses focus if for example, Discord is launching behind it. I can elaborate if needed, but this is a digression.

The actual feature request I want to make is as follows.

When no_cursor_warps = true, moving a window to another workspace behaves as expected, and the cursor retains its position. That is fine, because the mouse cursor has follow_mouse = 2 anyway. But I would like keyboard focus to move with the window, so that I can continue using the bind without needing to re-focus the window. This only happens when the window moves to another minitor's workspace AFAIK.

I have a hard time describing the issue because I'm not sure how the innards work. But here are the settings I believe to be relevant:

    monitor = eDP-1,preferred,1080x1920,1
    monitor = DP-1,preferred,0x1920,1
    monitor = ,preferred,auto,1

    general {
      no_cursor_warps = true
    }

    input {
      follow_mouse = 2
      float_switch_override_focus = false
    }

    bind = SUPERSHIFT,mouse_up,movetoworkspace,e+1
    bind = SUPERSHIFT,mouse_down,movetoworkspace,e-1

    bind = SUPERSHIFT,page_down,movetoworkspace,e+1
    bind = SUPERSHIFT,page_up,movetoworkspace,e-1

spikespaz avatar Aug 24 '22 20:08 spikespaz

in short: focus follows mouse 2 and no warps, if movey window to another workspace with a keybindo, it no retaino focuso, yes?

vaxerski avatar Aug 24 '22 20:08 vaxerski

Correct

spikespaz avatar Aug 24 '22 20:08 spikespaz

What is the code for mouse button 5 and 4? Not able to find it in XCB

spikespaz avatar Aug 24 '22 20:08 spikespaz

use wev

vaxerski avatar Aug 24 '22 20:08 vaxerski

Is VFR buggy? When I use movewindow with the arrow keys it seems that the screen only updates when I move the cursor. New issue or known?

spikespaz avatar Aug 24 '22 21:08 spikespaz

probably issue on your side. for me it works fine. the only known issue with VFR is #351

vaxerski avatar Aug 24 '22 21:08 vaxerski

I like you, good human

spikespaz avatar Aug 24 '22 21:08 spikespaz