String returns a human readable representation of this key binding. It does not descend into any child key maps.
()
| 52 | |
| 53 | // String returns a human readable representation of this key binding. It does not descend into any child key maps. |
| 54 | func (b *KeyBinding) String() string { |
| 55 | if b.HasChildren() { |
| 56 | return fmt.Sprintf("[%c] <keymap %s>", b.key, b.children.Name()) |
| 57 | } |
| 58 | |
| 59 | return fmt.Sprintf("[%c] %s", b.key, b.description) |
| 60 | } |
| 61 | |
| 62 | // SetLooping marks this key binding as a looping key binding. This |
| 63 | // key can be pressed repeatedly to execute the same command |