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

@@ -78,3 +78,12 @@ func makeTaskListingTitle(task model.Task) string {
}
return fmt.Sprintf("[%s]%s %s", getTaskTitleColor(task), checkbox, task.Title)
}
func handleTaskPaneShortcuts(event *tcell.EventKey) *tcell.EventKey {
switch event.Rune() {
case 'n':
app.SetFocus(newTask)
}
return event
}