Skip to content

Commit

Permalink
feat(tui)!: change default key for ToggleFreeze from f to be `ctr…
Browse files Browse the repository at this point in the history
…l+f` (#785)
  • Loading branch information
fujiapple852 committed Nov 12, 2023
1 parent 79ede90 commit 468622d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ command line option.
| `address-mode-ip` | Show IP address only | `i` |
| `address-mode-host` | Show hostname only | `n` |
| `address-mode-both` | Show both IP address and hostname | `b` |
| `toggle-freeze` | Toggle freezing the display | `f` |
| `toggle-freeze` | Toggle freezing the display | `ctrl+f` |
| `toggle-chart` | Toggle the chart | `c` |
| `toggle-map` | Toggle the GeoIp map | `m` |
| `expand-hosts` | Expand the hosts shown per hop | `]` |
Expand Down
5 changes: 4 additions & 1 deletion src/config/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ impl From<(HashMap<TuiCommandItem, TuiKeyBinding>, ConfigBindings)> for TuiBindi
toggle_freeze: *cmd_items
.get(&TuiCommandItem::ToggleFreeze)
.or(cfg.toggle_freeze.as_ref())
.unwrap_or(&TuiKeyBinding::new(KeyCode::Char('f'))),
.unwrap_or(&TuiKeyBinding::new_with_modifier(
KeyCode::Char('f'),
KeyModifiers::CONTROL,
)),
toggle_chart: *cmd_items
.get(&TuiCommandItem::ToggleChart)
.or(cfg.toggle_chart.as_ref())
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/render/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const HELP_LINES: [&str; 20] = [
"d - toggle hop details",
"c - toggle chart",
"m - toggle map",
"f - toggle freeze display",
"ctrl+f - toggle freeze display",
"Ctrl+r - reset statistics",
"Ctrl+k - flush DNS cache",
"i - show IP only",
Expand Down
2 changes: 1 addition & 1 deletion trippy-config-sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ previous-hop-address = ","
address-mode-ip = "i"
address-mode-host = "n"
address-mode-both = "b"
toggle-freeze = "f"
toggle-freeze = "ctrl+f"
toggle-chart = "c"
toggle-map = "m"
expand-hosts = "]"
Expand Down

0 comments on commit 468622d

Please sign in to comment.