MCPcopy Create free account
hub / github.com/ECSTeam/cloudfoundry-top-plugin / addTopLevelDataViewKeybindings

Method addTopLevelDataViewKeybindings

ui/masterUi.go:242–250  ·  view source on GitHub ↗

Add keybindings for top level data views -- note must also call addCommonDataViewKeybindings to get a full set of keybindings

(g *gocui.Gui, viewName string)

Source from the content-addressed store, hash-verified

240// Add keybindings for top level data views -- note must also call addCommonDataViewKeybindings
241// to get a full set of keybindings
242func (mui *MasterUI) addTopLevelDataViewKeybindings(g *gocui.Gui, viewName string) error {
243 if err := g.SetKeybinding(viewName, 'q', gocui.ModNone, mui.quit); err != nil {
244 log.Panicln(err)
245 }
246 if err := g.SetKeybinding(viewName, 'd', gocui.ModNone, mui.selectDisplayAction); err != nil {
247 log.Panicln(err)
248 }
249 return nil
250}
251
252// Add common keybindings for all data views -- note that this does not include
253// keybindings for "top level" data views which are ones that are selectable from

Callers 1

createAndOpenViewMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected