Custom keyboard
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Custom keyboard
Ours tried to eat the mouse attached to the laptop. Of course, Rumbles has an excuse. He is brainless.
Re: Custom keyboard
The cat obviously admires a photo of a desktop machine with an attached mouse.
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Re: Custom keyboard
Oh, I *know* Rumbles knows the difference, once he left a dead mouse on the bed, just to show me what he is capable of. Then he promptly went back to sleep, which is his natural state, aside from eating
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Custom keyboard
"ksnip" Hmm . . .
Ok, "darling"
- -
When I crank up my PPC G5 iMac running 10.4.11 the Metacard Prefs do NOT feature the "ScriptEditor" tab,
probably because I am not using the 3.5 IDE.
Seem quite unable to get either of Jacque's Magic stacks to "do" the magic with LC 4.0 and a folder containing Metacard 2.4.
This is a pox as still trying to track down a way to off-load key presses to some external something.
Ok, "darling"
- -
When I crank up my PPC G5 iMac running 10.4.11 the Metacard Prefs do NOT feature the "ScriptEditor" tab,
probably because I am not using the 3.5 IDE.
Seem quite unable to get either of Jacque's Magic stacks to "do" the magic with LC 4.0 and a folder containing Metacard 2.4.
This is a pox as still trying to track down a way to off-load key presses to some external something.
Re: Custom keyboard
WOW!!! Look what I started!
I had an opportunity to design a custom keyboard where the (Potential) client suggested he could save more than an hour/day.
Without knowing how he intended to save that much time with a simple keyboard layout I assumed that he might want to have keys associated with whole sentences or even paragraphs.
I figured out that probably the best solution for this would be to have an LC App that accomplished this and then do a copy and paste into the WhatsApp app.
Thanks for the entertainment and the help!
Tom
I had an opportunity to design a custom keyboard where the (Potential) client suggested he could save more than an hour/day.
Without knowing how he intended to save that much time with a simple keyboard layout I assumed that he might want to have keys associated with whole sentences or even paragraphs.
I figured out that probably the best solution for this would be to have an LC App that accomplished this and then do a copy and paste into the WhatsApp app.
Thanks for the entertainment and the help!
Tom
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Custom keyboard
I doubt that's possible. Allowing one app to type into another would present security issues.This is a pox as still trying to track down a way to off-load key presses to some external something.
Apps are written to accept input only from the OS. Someone with the right skills might be able to hack in and change that but I'd be surprised if a high level language like LC could do it. It would also probably be considered malware.
Windows and Mac have interapp communication that allow you to send specific messages to any other app that is written to accept them. But without their cooperation they won't respond to outside input.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Custom keyboard
It is possible to emulate a keyboard, and it is a security issue. See Rubber Ducky as one example:
https://latesthackingnews.com/2017/06/16/20456/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Custom keyboard
That seems a very good approach, simple and cost-effective.
If a more elaborate solution may be needed down the road, another option may be to fully compose and send messages to WhatsApp from your LC app using the WhatsApp API:
https://developers.facebook.com/docs/wh ... ng-started
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Custom keyboard
Thanks, Richard and Jacque.
I tried the copy and paste thing. It seems to work. Copy to the clipboard and then paste into the message box of the WhatsApp App. That works on my iPhone. Maybe a security hole in WhatsApp but.....
Tom
I tried the copy and paste thing. It seems to work. Copy to the clipboard and then paste into the message box of the WhatsApp App. That works on my iPhone. Maybe a security hole in WhatsApp but.....
Tom
Re: Custom keyboard
By the way, Android allows 2 Apps to be displayed at the same time using a split screen. This makes it even easier to do the copy/paste task on Android.
Tom
Tom
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Custom keyboard
Pasting is a user gesture, so it's reasonably safe, at least compared to things that might emulate user actions but don't actually require the user's engagement (or even awareness).
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Custom keyboard
Actually, not so much. The reason you don't see it is because you are just not devious and bone headed enough to figure out how to find it.richmond62 wrote: ↑Mon Nov 11, 2019 12:20 pmWhen I crank up my PPC G5 iMac running 10.4.11 the Metacard Prefs do NOT feature the "ScriptEditor" tab,
probably because I am not using the 3.5 IDE.
Screen shot of Mc 2.2 where it was blatantly out in the open for everyone to see up to vers. 2.5 (or so) - However, later on, the options visibility was set to 'false' (not sure why). Changing it to 'true' re-enables it in any version I tested it on.
While I still don't have a stable Mac setup (and probably too much going on at the moment to even try to sort it out), you don't actually need the stacks Jacque made to run Mc on Mac (or anywhere else). You just have to move the folders/files as we discussed in the Mc topic. Least, that worked here on OSX 10.6.5, your mileage may vary on anything later.richmond62 wrote: ↑Mon Nov 11, 2019 12:20 pmSeem quite unable to get either of Jacque's Magic stacks to "do" the magic with LC 4.0 and a folder containing Metacard 2.4.
@ Richard - I am not having an issue with what you said, as it makes some sense, however just about every Os I've ever used has a virtual keyboard program, Windows does, Linux does (several in fact), I can't test at the moment but I'm pretty sure Mac does as well. Every mobile device I've ever seen a picture of someone typing, they are typing with a virtual keyboard.
*IF* that is the case, I'm not sure why it would not be able to be tapped into, although my methods of doing so may wind up being pretty unorthodox, or may not work at all. If they don't work, I'll have learned something for sure If they do, I don't see the harm in exploiting it for simple text things. I've already found 3 ways of sending text to another program here on 'nix, albeit so far not in a direct 1 to 1 manner, mostly through issuing shell commands or using files.
However, that isn't the goal I'm shooting for, so I am pressing on. I was *kind* of right in what I thought about the "process" commands, starting a text editor that way doesn't seem to be any trick at all, it shows up in the list of openProcesses, it has an 'id' (nix only I'm pretty sure), however direct typing doesn't seem to be a possibility. I'm not sure I understand why not, all the examples I've seen seem to indicate it should be in a way, i.e. sending a string to the openProcess "processName" after opening it for text update. I am setting that method aside for a future look at.
@Tom - it is an interesting mind exercise for me, at this point I am really curious if it can be done or not. Thank you for bringing it up
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Custom keyboard
Yep, OSes provide their own keyboards, and at least Android (maybe iOS, but I don't know for sure) provides APIs for third parties to make keyboards.bogs wrote: ↑Tue Nov 12, 2019 12:14 am@ Richard - I am not having an issue with what you said, as it makes some sense, however just about every Os I've ever used has a virtual keyboard program, Windows does, Linux does (several in fact), I can't test at the moment but I'm pretty sure Mac does as well. Every mobile device I've ever seen a picture of someone typing, they are typing with a virtual keyboard.
Those APIs could be used from LiveCode Builder, but LiveCode script has no direct support for them at this time, as I noted in my first reply.
If it were simple for an app to control input into another app everyone would be doing it, and the outcome in many cases wouldn't be pretty. If my app can control yours, I could probably do that without your direct intervention, or perhaps even your knowledge. And before you know it I've got you signed up for every expensive add-on every app on your phone offers, and I've sent all manner of embarrassing messages through all of your chat apps.
I've never needed to make a custom mobile keyboard, so I've never looked into those APIs. But given the implications, I'm guessing there are reasonable safeguards to prevent malicious Trojan Horse keyboards. But even if those protections are modest, the APIs would require LC Builder's Foreign Function Interface to use. I know of no command in LC Script that can seize control of text input in other apps away from the user.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Custom keyboard
There are numerous Keyboard Apps on the App Store. None of them have more than a single character or emoji per key as in a sentence or paragraph as far as I can tell.FourthWorld wrote: ↑Tue Nov 12, 2019 12:59 amOSes provide their own keyboards, and at least Android (maybe iOS, but I don't know for sure) provides APIs for third parties to make keyboards.
When I can catch my breath I might look into LC Builder and the keyboard API's on iOS.
Thanks again for all the help I am able to get from this forum!
Tom
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Custom keyboard
Apple forbade custom keyboards for years until maybe 2 years ago or so. SwiftKey was anxious to get into the App Store, it's one of the best selling keyboards on Android. Apple finally relented and once the gates opened the developers swarmed in. I'm sure Apple reviews those submissions carefully.But given the implications, I'm guessing there are reasonable safeguards to prevent malicious Trojan Horse keyboards.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com