Change shortcuts to Alt+Letter
@@ -218,30 +218,32 @@ func NewWindow(discord *discordgo.Session) (*Window, error) {
frame.SetTitle("Cordless")
app.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
- if event.Rune() == 'C' {
+ if event.Modifiers()&tcell.ModAlt == tcell.ModAlt {
+ if event.Rune() == 'c' {
app.SetFocus(channelsPlaceholder)
return nil
}
- if event.Rune() == 'S' {
+ if event.Rune() == 's' {
app.SetFocus(serversPlaceholder)
return nil
}
- if event.Rune() == 'T' {
+ if event.Rune() == 't' {
app.SetFocus(window.messageContainer)
return nil
}
- if event.Rune() == 'U' {
+ if event.Rune() == 'u' {
app.SetFocus(window.userContainer)
return nil
}
- if event.Rune() == 'M' {
+ if event.Rune() == 'm' {
app.SetFocus(window.messageInput)
return nil
}
+ }
return event
})
