Modifier states returned from x backend should be 100% correct now

This commit is contained in:
2022-11-24 22:16:22 -05:00
parent 941a78eaf1
commit e588d7d791
4 changed files with 30 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
package main
import "os"
import "fmt"
import "image"
import _ "image/png"
import "git.tebibyte.media/sashakoshka/stone"
@@ -33,9 +34,18 @@ func main () {
}
func onPress (button stone.Button, modifiers stone.Modifiers) {
println("press", button)
fmt.Printf (
"=>>\t0x%X\tsh: %t\tctrl: %t\talt: %t\tm: %t\ts: %t \th: %t\tnumpad: %t\n",
button,
modifiers.Shift,
modifiers.Control,
modifiers.Alt,
modifiers.Meta,
modifiers.Super,
modifiers.Hyper,
modifiers.NumberPad)
}
func onRelease (button stone.Button) {
println("release", button)
fmt.Printf("<--\t0x%X\n", button)
}