Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Cmd.SyncKeycaps

Description

Manage the optional keycaps window.

Synopsis

Documentation

open :: Cmd.M m => m () Source #

close :: Cmd.M m => m () Source #

update :: Cmd.M m => m () Source #

get_bindings :: Cmd.M m => Cmd.KeycapsState -> m KeycapsT.Bindings Source #

Get the applicable bindings for the KeycapsState.

This duplicates Cmd.Track, and the checks duplicate the checks inside the underlying calls like EditUtil.fallthrough and Cmd.is_kbd_entry. It's not exactly ideal, but it seemed more practical than, say, trying to get all Cmds into the Keymap mold. The kbd_entry ones would waste a lot of allocation on each cmd constructing a Map just to look up a single key.

But the duplication means that the keycaps can be inaccurate, especially the exact shadowing situtaion may be incorrect.