Use utf8.DecodeRuneInString instead of []rune(string)[0] GO-P4006
Performance
Major
6 months agoa year old
consider replacing []rune(key)[0] with utf8.DecodeRuneInString(key)
 505			} else if len(key) == 2 && strings.HasPrefix(lkey, "f") && key[1] >= '1' && key[1] <= '9' {
 506				chord = tui.F1 + int(key[1]) - '1'
 507			} else if utf8.RuneCountInString(key) == 1 {
 508				chord = tui.AltZ + int([]rune(key)[0]) 509			} else {
 510				errorExit("unsupported key: " + key)
 511			}