Skip to content

Commit 108c25b

Browse files
committed
Let scrollbars tab away focus
1 parent 11ee9ce commit 108c25b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Terminal/Widgets/ScrollBar.rakumod

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ class Terminal::Widgets::HScrollBar
145145
Ctrl-CursorRight => 'bar-right-scroll',
146146
Home => 'home-scroll',
147147
End => 'end-scroll',
148+
Ctrl-I => 'focus-next', # Tab
149+
ShiftTab => 'focus-prev', # Shift-Tab is weird and special
148150
;
149151

150152
my $keyname = $event.keyname;
@@ -155,6 +157,8 @@ class Terminal::Widgets::HScrollBar
155157
when 'bar-right-scroll' { self.bar-right-scroll }
156158
when 'home-scroll' { self.home-scroll }
157159
when 'end-scroll' { self.end-scroll }
160+
when 'focus-next' { self.focus-next }
161+
when 'focus-prev' { self.focus-prev }
158162
}
159163
}
160164

@@ -288,6 +292,8 @@ class Terminal::Widgets::VScrollBar
288292
Ctrl-CursorDown => 'bar-down-scroll',
289293
Home => 'home-scroll',
290294
End => 'end-scroll',
295+
Ctrl-I => 'focus-next', # Tab
296+
ShiftTab => 'focus-prev', # Shift-Tab is weird and special
291297
;
292298

293299
my $keyname = $event.keyname;
@@ -298,6 +304,8 @@ class Terminal::Widgets::VScrollBar
298304
when 'bar-down-scroll' { self.bar-down-scroll }
299305
when 'home-scroll' { self.home-scroll }
300306
when 'end-scroll' { self.end-scroll }
307+
when 'focus-next' { self.focus-next }
308+
when 'focus-prev' { self.focus-prev }
301309
}
302310
}
303311

0 commit comments

Comments
 (0)