Custom Bindings — rataflow

rataflow

GitHubdocs.rscrates.io
examples/custom_bindings.rs ↗

Custom key bindings via the action-based pattern.

The action pattern separates "what to do" (FlowAction/ControlsAction) from "how to trigger it" (key bindings). This example adds custom bindings that take priority, then falls through to defaults.

Custom bindings (override defaults):

  • WASD: pan (instead of hjkl)
  • Tab/Shift+Tab: navigate (instead of arrow keys)
  • z/x: zoom (instead of +/-)
  • Space: fit view (instead of f)

Default bindings (fallthrough):

  • Del/Backspace, Esc, c, m, i, 0, etc.