"github.com/zyedidia/tcell"
)
-var Bindings = DefaultBindings()
-
func InitBindings() {
+ config.Bindings = DefaultBindings()
+
var parsed map[string]string
defaults := DefaultBindings()
util.TermMessage("Raw events not supported yet")
}
- Bindings[k] = v
+ config.Bindings[k] = v
}
// findKeyEvent will find binding Key 'b' using string 'k'
k = string(unicode.ToUpper(rune(k[0]))) + k[1:]
if code, ok := keyEvents["Ctrl"+k]; ok {
var r tcell.Key
- if code < 256 {
+ // Special case for escape, for some reason tcell doesn't send it with the esc character
+ if code < 256 && code != 27 {
r = code
}
// It is, we're done.
// See if we can find the key in bindingKeys
if code, ok := keyEvents[k]; ok {
var r tcell.Key
- if code < 256 {
+ // Special case for escape, for some reason tcell doesn't send it with the esc character
+ if code < 256 && code != 27 {
r = code
}
return KeyEvent{