Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
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.