Skip to content

Keyboard focus navigation with 4 windows not fully working as expected #8614

@Thulium-Drake

Description

@Thulium-Drake
  • Sway Version:
    sway version 1.10.1 (on Fedora 41)

  • Configuration File:

# Alt key
set $mod Mod1

# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l

# move focus
$mod+$left  focus left
$mod+$down  focus down
$mod+$up    focus up
$mod+$right focus right
  • Description:
    Navigating around different panes with the keyboard in the same workspace doesn't always lead to logical results.

Consider this layout:

| 1 | 2 |
|---|---|
| 3 | 4 |

When using the hotkeys mentioned in the config example above, I would expect to be able to navigate focus with the following moves:

  1. 1-2
  2. 1-3
  3. 2-4
  4. 3-4
    And their opposites.

But if the layout was made as follows:

|   1   |
|       |
  1. Split vertical
| 1 | 2 |
|   |   |
  1. Split 1 horizontal
| 1 | 2 |
|---|   |
| 3 |   |
  1. Split 2 horizontal, and the focused windows are 2 and 4 (the, in my case, blue and grey borders)
| 1 | [2] |
|---|-----|
| 3 | [4] |

The possible moves are:

  1. 2-1 and back
  2. 2-4 and back

After moving focus from 2 to 1 for example, the layout now looks like this:

| [1] |  2  |
|-----|-----|
| 3   | [4] |

Now, when moving 'down', I expect the focus to go from 1 to 3, instead it goes to 4.

I hope this explanation makes sense and makes the problem clear! :-)

If you need any additional information, please let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions