summaryrefslogtreecommitdiff
path: root/test/kbtest.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/kbtest.go')
-rw-r--r--test/kbtest.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/kbtest.go b/test/kbtest.go
index 0a21954..d6fa7c1 100644
--- a/test/kbtest.go
+++ b/test/kbtest.go
@@ -34,7 +34,9 @@ func (a *keyboardArea) Paint(cliprect image.Rectangle) *image.NRGBA {
return a.kbd.SubImage(cliprect).(*image.NRGBA)
}
-func (a *keyboardArea) Mouse(MouseEvent) {}
+func (a *keyboardArea) Mouse(MouseEvent) (repaint bool) {
+ return false
+}
func markkey(dest *image.NRGBA, keypt image.Point, m Modifiers) {
xr := keyrect(m).Add(keypt)
@@ -42,7 +44,7 @@ func markkey(dest *image.NRGBA, keypt image.Point, m Modifiers) {
draw.Draw(dest, xr, xi, image.ZP, draw.Over)
}
-func (a *keyboardArea) Key(e KeyEvent) bool {
+func (a *keyboardArea) Key(e KeyEvent) (handled bool, repaint bool) {
a.lock.Lock()
defer a.lock.Unlock()
@@ -68,9 +70,9 @@ func (a *keyboardArea) Key(e KeyEvent) bool {
// markkey(a.kbd, modpoints[Super], m &^ Super)
// }
default:
- return false
+ return false, false
}
- return true
+ return true, true
}
var doKeyboard = flag.Bool("kb", false, "run keyboard test")