I tried running a Windows based program on Xojo Linux and the Key Down appears to not work on a button. Does anyone know whether I need to download a special “program” to have Linux complete the function? Thank you.
What is “Xojo Linux”? I would think the question would pertain to the particular Linux distribution. I’m also not sure what you mean by “running a Windows-based program.” Also, why do you need a key down event on a button?
“Pressed” Event perchance?
It’s been a while since I’ve done any programming. “Pressed” it is. Thank you.
With that cleared up, on which Linux distro is the Pressed event not firing? I have many Linux VMs and I’ve not seen that anywhere. Edit: and what version of Xojo (and are you running the IDE on the Linux machine)?
Since my last comment, I installed 2025r3 on my Ubuntu 24 LTS VM, and ran a simple Hello World pushbutton project in the debugger. It worked fine.
This leads me to believe (it’s not really clear) that your whole issue was in mistakenly trying to implement KeyDown instead of Pressed–i.e, when David mentioned that, you were fine. If so, kindly mark “solved” on David’s comment. ![]()
Tried on RPI 4, Debian 12 and 13, Rocky Linux 9.7 GNOME and Pressed worked fine
Xojo 2025R3
The Key Down should only work if the Button has focus.
Usually in my mac I don’t have keyboard navigation so the buttons do not show focus and for that reason key down doesn’t work.
I use Pressed event for this reason and I need to click the button to fire that event.
I can’t test on Linux to see if: a) there is focus on the buttons and b) the key down event fires if the button has focus
Can you explain a little more what you want to do?
Maybe using Pressed fixed your problem and that is why you posted:
@AlbertoD
We just will not know until OP replies
![]()