Include missing rune, key or button in error

This commit is contained in:
Unrud 2023-02-23 01:09:04 +01:00
parent 6f03281fc7
commit 124152f7ec
4 changed files with 10 additions and 9 deletions

View file

@ -33,6 +33,7 @@ package inputcontrol
import "C"
import (
"errors"
"fmt"
"strings"
"sync"
"time"
@ -309,7 +310,7 @@ func (p *x11Controller) PointerButton(button PointerButton, press bool) error {
case PointerButtonMiddle:
return p.sendButton(2, press)
default:
return errors.New("unsupported pointer button")
return fmt.Errorf("unsupported pointer button: %#v", button)
}
}