Discussion:
Window keyup not working
donJ
2017-09-23 16:09:01 UTC
Permalink
Hi
What I want to do is allow the user to hold down a key to briefly show a
value in a Label.
In a new project, this works:

KeyDown(Key as String) as Boolean
If Key = "c" then
Label1.text = "the info"
End if

KeyUp(Key as String)
If Key = "c" then
Label1.text = ""
End if

In the app I'm working on, KeyDown works fine, but KeyUp never fires
(with or without "return true")
None of the controls on the window have a KeyDown nor a KeyUp event handler.
All of the controls on the window are either canvases or labels, many
include MouseDown and MouseUp event handlers

Does anyone have an idea what sort of thing might be interferring? I
don't know where else to look.

Xojo2017r2.1
Linux Mint 18 and also Debian 7

Thanks for your time,
Don


To unsubscribe, email ***@xojo.com
Lars Jensen
2017-09-23 18:48:23 UTC
Permalink
I haven't read this all the way through, but maybe it will help:

https://forum.xojo.com/11433-window-keyup-doesn-t-fire/0
Post by donJ
Hi
What I want to do is allow the user to hold down a key to briefly show a
value in a Label.
KeyDown(Key as String) as Boolean
If Key = "c" then
Label1.text = "the info"
End if
KeyUp(Key as String)
If Key = "c" then
Label1.text = ""
End if
In the app I'm working on, KeyDown works fine, but KeyUp never fires (with
or without "return true")
None of the controls on the window have a KeyDown nor a KeyUp event handler.
All of the controls on the window are either canvases or labels, many
include MouseDown and MouseUp event handlers
Does anyone have an idea what sort of thing might be interferring? I don't
know where else to look.
Xojo2017r2.1
Linux Mint 18 and also Debian 7
Thanks for your time,
Don
To unsubscribe, email ***@xojo.com
donJ
2017-09-23 19:45:26 UTC
Permalink
Post by Lars Jensen
https://forum.xojo.com/11433-window-keyup-doesn-t-fire/0
Hi Lars,
Yep, that does it. I added a "ClearFocus" at the end of the keydown code.

Thanks,
Don


To unsubscribe, email ***@xojo.com
Lars Jensen
2017-09-23 21:41:25 UTC
Permalink
Cool, we both learned something :)

lj
Post by donJ
Post by Lars Jensen
https://forum.xojo.com/11433-window-keyup-doesn-t-fire/0
Hi Lars,
Yep, that does it. I added a "ClearFocus" at the end of the keydown code.
Thanks,
Don
To unsubscribe, email ***@xojo.com
Markus Winter
2017-09-23 21:56:47 UTC
Permalink
Post by Lars Jensen
Cool, we both learned something :)
… and not just only the two of you either ;-)


To unsubscribe, email ***@xojo.com

Continue reading on narkive:
Loading...