Organized approach to handle shortcuts based on currently focused panel

This commit is contained in:
Anis Ahmad
2020-05-30 13:17:20 +06:00
parent 9a6d3c6b30
commit 89624edcba
4 changed files with 43 additions and 15 deletions

View File

@@ -76,3 +76,12 @@ func loadProject(idx int) {
contents.RemoveItem(detailPane)
}
func handleProjectPaneShortcuts(event *tcell.EventKey) *tcell.EventKey {
switch event.Rune() {
case 'n':
app.SetFocus(newProject)
}
return event
}