Add a default shortcut for visually focusing windows

Fixes #4110
This commit is contained in:
Kovid Goyal 2021-10-11 20:28:58 +05:30
parent 440640bbbc
commit 572df007df
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 9 additions and 0 deletions

View File

@ -57,6 +57,7 @@ Previous window :sc:`previous_window`
Move window forward :sc:`move_window_forward`
Move window backward :sc:`move_window_backward`
Move window to top :sc:`move_window_to_top`
Visually focus window :sc:`focus_visible_window`
Focus specific window :sc:`first_window`, :sc:`second_window` ... :sc:`tenth_window`
(also :kbd:`⌘+1`, :kbd:`⌘+2` ... :kbd:`⌘+9` on macOS)
(clockwise from the top-left)

View File

@ -12,6 +12,10 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
output of the last command in a new window, etc. See :ref:`shell_integration`
for details.
- A new shortcut :sc:`focus_visible_window` to visually focus a window using
the keyboard. Pressing it causes numbers to appear over each visible window
and you can press the number to focus the corresponding window (:iss:`4110`)
- A new option :opt:`tab_bar_align` to draw the tab bar centered or right
aligned (:iss:`3946`)

View File

@ -3149,6 +3149,8 @@ map('Ninth window',
map('Tenth window',
'tenth_window kitty_mod+0 tenth_window',
)
map('Visually select focus window', 'focus_visible_window kitty_mod+f7 focus_visible_window')
egr() # }}}

View File

@ -767,6 +767,8 @@ defaults.map = [
KeyDefinition(False, KeyAction('ninth_window'), 1024, False, 57, ()),
# tenth_window
KeyDefinition(False, KeyAction('tenth_window'), 1024, False, 48, ()),
# focus_visible_window
KeyDefinition(False, KeyAction('focus_visible_window'), 1024, False, 57370, ()),
# next_tab
KeyDefinition(False, KeyAction('next_tab'), 1024, False, 57351, ()),
# next_tab