module Obsctl::TUI::WhichKeyLayout

Overview

The which-key menu that opens while a key sequence is half typed. It floats above the palette, is as tall as the pending sequence needs, and never grows past the space it has.

Extended Modules

Defined in:

obsctl/tui/layout.cr

Constant Summary

MIN_WIDTH = 22

Instance Method Summary

Instance Method Detail

def compute(area : CryTUI::Rect, entries : Array(Keymap::Entry), anchor : CryTUI::Rect) : CryTUI::Rect #

[View source]
def entry_text(entry : Keymap::Entry) : String #

One menu row. The widget splits this into styled spans that concatenate back to exactly this string, so the measured width stays honest.


[View source]
def visible(entries : Array(Keymap::Entry), rect : CryTUI::Rect) : Array(Keymap::Entry) #

The entries that fit inside the panel once its borders are taken.


[View source]