Updated Area's KeyEvent documentation to talk about some window managers on Unix intercepting some events; also updated the keyboard test program to make a note of behaviors related to that.
This commit is contained in:
parent
14bb9e3621
commit
00acf74177
5
area.go
5
area.go
|
@ -124,6 +124,11 @@ func (e MouseEvent) HeldBits() (h uintptr) {
|
||||||
// unconditionally, which may result in unwanted behavior like
|
// unconditionally, which may result in unwanted behavior like
|
||||||
// global task-switching keystrokes not being processed.)
|
// global task-switching keystrokes not being processed.)
|
||||||
//
|
//
|
||||||
|
// Note that even given the above, some systems might intercept
|
||||||
|
// some keystrokes (like Alt-F4 on various Unix systems) before
|
||||||
|
// Area will ever see them (and the Area might get an incorrect
|
||||||
|
// KeyEvent in this case, but this is not guaranteed); be wary.
|
||||||
|
//
|
||||||
// If a key is pressed that is not supported by Key, ExtKey,
|
// If a key is pressed that is not supported by Key, ExtKey,
|
||||||
// or Modifiers, no KeyEvent will be produced, and package
|
// or Modifiers, no KeyEvent will be produced, and package
|
||||||
// ui will act as if false was returned for handled.
|
// ui will act as if false was returned for handled.
|
||||||
|
|
|
@ -80,7 +80,7 @@ func kbTest() {
|
||||||
w := NewWindow("Hi", wid, ht)
|
w := NewWindow("Hi", wid, ht)
|
||||||
err := w.Open(a)
|
err := w.Open(a)
|
||||||
if err != nil { panic(err) }
|
if err != nil { panic(err) }
|
||||||
<-w.Closing
|
select {} // some X11-based systems intercept Alt-F4 and various other keys; this is to find out if we get the key event anyway after ignoring the other requests (it has the effect of requiring us to abort the keyboard test though)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in New Issue