Documentation ¶
Overview ¶
Package mapkeys provides a widget that can map one keypress to a sequence of keypresses. If the user pnovides as input a key that is mapped, the sequence of resulting keypresses is played to the subwidget before control returns. If the key is not mapped, it is passed through as normal. I'm going to use this to provide a vim-like macro feature in termshark.
Index ¶
- type Widget
- func (w *Widget) AddMapping(from vim.KeyPress, to vim.KeySequence, app gowid.IApp)
- func (w *Widget) ClearMappings(app gowid.IApp)
- func (w *Widget) RemoveMapping(from vim.KeyPress, app gowid.IApp)
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Widget ¶
func (*Widget) AddMapping ¶
func (*Widget) ClearMappings ¶
ClearMappings will remove all mappings. I deliberately preserve the same dictionary, though in case I decide in the future it's useful to let clients have direct access to the map (and so maybe store it somewhere).
Click to show internal directories.
Click to hide internal directories.