mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-27 03:10:24 +00:00
Show key name in raw pane
This commit is contained in:
parent
1f58eecf3c
commit
0654db334a
1 changed files with 7 additions and 0 deletions
|
|
@ -35,6 +35,13 @@ func (h *RawPane) HandleEvent(event tcell.Event) {
|
|||
}
|
||||
|
||||
h.Buf.Insert(h.Cursor.Loc, reflect.TypeOf(event).String()[7:])
|
||||
|
||||
switch e := event.(type) {
|
||||
case *tcell.EventKey:
|
||||
h.Buf.Insert(h.Cursor.Loc, fmt.Sprintf(": %s", e.Name()))
|
||||
}
|
||||
|
||||
h.Buf.Insert(h.Cursor.Loc, fmt.Sprintf(": %q\n", event.EscSeq()))
|
||||
|
||||
h.Relocate()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue