---
config/bindings.go | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/config/bindings.go b/config/bindings.go
index 9956b41..3a07505 100644
--- a/config/bindings.go
+++ b/config/bindings.go
@@ -99,6 +99,7 @@ var (
func ParseKeyStrokes(keystrokes string) ([]KeyStroke, error) {
var strokes []KeyStroke
buf := bytes.NewBufferString(keystrokes)
+ skipNext := false
for {
tok, _, err := buf.ReadRune()
if err == io.EOF {
@@ -106,9 +107,19 @@ func ParseKeyStrokes(keystrokes string) ([]KeyStroke, error) {
} else if err != nil {
return nil, err
}
+ if skipNext {
+ skipNext = false
+ strokes = append(strokes, KeyStroke{
+ Key: tcell.KeyRune,
+ Rune: tok,
+ })
+ continue
+ }
// TODO: make it possible to bind to < or > themselves (and default to
// switching accounts)
switch tok {
+ case '\\':
+ skipNext = true
case '<':
name, err := buf.ReadString(byte('>'))
if err == io.EOF {
2.33.0