Safe Haskell | Safe-Inferred |
---|
Manage the optional keycaps window.
Synopsis
- open :: Cmd.M m => m ()
- close :: Cmd.M m => m ()
- update :: Cmd.M m => m ()
- get_bindings :: Cmd.M m => Cmd.KeycapsState -> m KeycapsT.Bindings
Documentation
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.