keyDown doesn't work on mobile

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 665
Joined: Tue Jul 29, 2014 12:52 am

keyDown doesn't work on mobile

Post by simon.schvartzman » Mon Mar 10, 2025 4:30 pm

Contrary to what it says in the manual, KeyDown doesn't work on mobile in Classic and I also learned it will not be prioritised on Crate, I think at least it should be taken out of the manual...
keydown.jpeg
Simon
________________________________________
To ";" or not to ";" that is the question

stam
Posts: 3061
Joined: Sun Jun 04, 2006 9:39 pm

Re: keyDown doesn't work on mobile

Post by stam » Mon Mar 10, 2025 4:37 pm

KeyDown as written in question, or RawKeyDown as shown in image? Or both?

simon.schvartzman
Posts: 665
Joined: Tue Jul 29, 2014 12:52 am

Re: keyDown doesn't work on mobile

Post by simon.schvartzman » Mon Mar 10, 2025 5:40 pm

both of them!!!
Simon
________________________________________
To ";" or not to ";" that is the question

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: keyDown doesn't work on mobile

Post by jacque » Tue Mar 11, 2025 6:04 pm

It's possible to to attach a physical keyboard to mobile devices,, and that may be the requirement for the keyDown message to be sent. LC relies on the OS to send keyboard messages and it's likely the device checks for one.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

scott_morrow
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 38
Joined: Tue Jun 27, 2006 8:35 pm
Contact:

Re: keyDown doesn't work on mobile

Post by scott_morrow » Wed Mar 12, 2025 3:42 am

I encountered this a while back when testing on an iPad Pro 13inch 2024 (M4) and Magic Keyboard. While the app works on desktop (with a keyboard) and on mobile (with a custom screen number pad) the fancy Magic Keyboard (which appears to work flawlessly otherwise) in LiveCode, doesn't produce keyDown or rawKeyDown messages. It has been a a few months since I looked at this but Bug 23783 (Key events [keyUp/keyDown/rawKeyUp/rawKeyDown etc] do not work with card focus on iOS) might be the culprit. Though, if I remember correctly, I wasn't getting it to work even with a focused control.
Elementary Software
...now with 20% less chalk dust!

simon.schvartzman
Posts: 665
Joined: Tue Jul 29, 2014 12:52 am

Re: keyDown doesn't work on mobile

Post by simon.schvartzman » Wed Mar 12, 2025 11:49 am

@scott_morro, this is exactly where we are...LC has recognised the bug...
Simon
________________________________________
To ";" or not to ";" that is the question

Post Reply