mirror of
https://github.com/miguelmota/cointop
synced 2024-11-14 18:12:57 +00:00
Fix wrong scope of var (#293)
* Fix wrong scope of var * Fix some keys couldn't bind
This commit is contained in:
parent
60de82342d
commit
ad95052e02
@ -51,10 +51,9 @@ func (ct *Cointop) ParseKeys(s string) (interface{}, tcell.ModMask) {
|
||||
mod := tcell.ModNone
|
||||
|
||||
// translate legacy and special names for keys
|
||||
s = strings.TrimSpace(s)
|
||||
keyName := keyMap(s)
|
||||
if len(s) > 1 {
|
||||
keyName := strings.Replace(s, "+", "-", -1)
|
||||
keyName := keyMap(strings.TrimSpace(s))
|
||||
if len(keyName) > 1 {
|
||||
keyName = strings.Replace(keyName, "+", "-", -1)
|
||||
|
||||
split := strings.Split(keyName, "-")
|
||||
if len(split) > 1 {
|
||||
@ -98,7 +97,7 @@ func (ct *Cointop) ParseKeys(s string) (interface{}, tcell.ModMask) {
|
||||
}
|
||||
|
||||
if key == nil {
|
||||
log.Debugf("Could not map key descriptio '%s' to key", s)
|
||||
log.Debugf("Could not map key '%s' to key", s)
|
||||
}
|
||||
return key, mod
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user