diff --git a/mouse.go b/mouse.go index 14ce0ad1f7..54f5c37b34 100644 --- a/mouse.go +++ b/mouse.go @@ -41,6 +41,11 @@ const ( MouseExtra2 ) +// String returns a string representation of the mouse button. +func (b MouseButton) String() string { + return mouseButtons[b] +} + var mouseButtons = map[MouseButton]string{ MouseNone: "none", MouseLeft: "left",