Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an explanation of how to use events to the create-window example #1

Merged
merged 19 commits into from
Mar 7, 2021
Merged
Prev Previous commit
Add missing "\n" at the end of fmt.Printf
  • Loading branch information
jezek authored Mar 7, 2021
commit 06eab223430e738079eb644911256671a319980e
2 changes: 1 addition & 1 deletion examples/create-window/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func main() {
// See https://pkg.go.dev/github.com/jezek/xgb/xproto#KeyPressEvent
// for documentation about a key press event.
kpe := ev.(xproto.KeyPressEvent)
fmt.Printf("Key pressed: %d", kpe.Detail)
fmt.Printf("Key pressed: %d\n", kpe.Detail)
// The Detail value depends on the keyboard layout,
// for QWERTY, q is #24.
if kpe.Detail == 24 {
Expand Down