Modifier states returned from x backend should be 100% correct now
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user