Custom keyboard
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Custom keyboard
Well, like I said up there, I think there is a way, but unfortunately have never explored it too much.
The reason I think it must be doable (at least on the desktop) is that all the way back to Mc you could use an external editor apparently using nothing but Lc scripting.
SEVERAL others have taken that and applied it to plugins as well, Ken Ray did it, Trevor did it, Thierry has done something like it but in a different and spectacular reverse IDE way.
My conclusion, it is completely doable, and probably not that difficult, once you know how.
The reason I think it must be doable (at least on the desktop) is that all the way back to Mc you could use an external editor apparently using nothing but Lc scripting.
SEVERAL others have taken that and applied it to plugins as well, Ken Ray did it, Trevor did it, Thierry has done something like it but in a different and spectacular reverse IDE way.
My conclusion, it is completely doable, and probably not that difficult, once you know how.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Custom keyboard
Aha: so after the snidity (err, is that a real word?), sarcasm and so on you are now indulging in profundity.probably not that difficult, once you know how
Better try and fish out a computer (the iMacs of various vintages are stacked 4 deep on my desk,
like some sort of library) that runs MetaCard in some way that is usable and try to fish out the
underlying code.
Isn't it "funny" how LiveCode, for some reason (cough), have seen fit to drop one or two
seemingly rather useful things that were 'there' in MetaCard and earlier recensions of Revolution/Livecode?
NO: don't answer that one; it is rhetorical.
Had a bad week with "plugins" (see the Off-Topic Forum), so really would like to have built-in code.
Re: Custom keyboard
You should be able to run Mc easily on any 'nix or win desktop, or with minimum difficulty on mac (can't say for the newest ones which don't run 32 bit though, may have to use the latest Lc install to get that one to fly).
Reasoning for doing x over y is highly dependent on what is going on at the time. Much as I love working in the Mc IDE, I can see a LOT of why certain choices were made when moving to RR 1 and 2 and later. Some of them I don't understand, but I wasn't around at the time either and so may be missing a lot of back-history behind the decision(s).
I finally did get a copy of 2.8.x going too, which is a kind of "in-between" the original RR IDE and the "new(er)" current layout. I can tell you that for a 1 guy doing it perspective, going through all the stacks is a long process. Noting things that were changed and the reason why is informative as well. A lot of the original code was tied to things that it probably shouldn't have been, discovered, changed, re-hashed, rinse / repeat.
Some of the code is over my head / current level, so I can only guess at what it is doing. I find it somewhat daunting to reach those areas. Some of it was refactored, some of it has redundant looping. Some of it is just plain weird.
Your specialty program just went through a re-write, I'd think of all people you could understand why changes are made (or not) to particular aspects of a program.
It is ok, I'm a rhetorical kinda guyrichmond62 wrote: ↑Thu Nov 07, 2019 11:42 amIsn't it "funny" how LiveCode, for some reason (cough), have seen fit to drop one or two
seemingly rather useful things that were 'there' in MetaCard and earlier recensions of Revolution/Livecode?
NO: don't answer that one; it is rhetorical.
Reasoning for doing x over y is highly dependent on what is going on at the time. Much as I love working in the Mc IDE, I can see a LOT of why certain choices were made when moving to RR 1 and 2 and later. Some of them I don't understand, but I wasn't around at the time either and so may be missing a lot of back-history behind the decision(s).
I finally did get a copy of 2.8.x going too, which is a kind of "in-between" the original RR IDE and the "new(er)" current layout. I can tell you that for a 1 guy doing it perspective, going through all the stacks is a long process. Noting things that were changed and the reason why is informative as well. A lot of the original code was tied to things that it probably shouldn't have been, discovered, changed, re-hashed, rinse / repeat.
Some of the code is over my head / current level, so I can only guess at what it is doing. I find it somewhat daunting to reach those areas. Some of it was refactored, some of it has redundant looping. Some of it is just plain weird.
Your specialty program just went through a re-write, I'd think of all people you could understand why changes are made (or not) to particular aspects of a program.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Custom keyboard
With no difficulty whatsoever on my G5 iMac running 10.4.11.with minimum difficulty on mac
No it didn't: that's a horribly-long-winded process, and not really a rewrite as such,Your specialty program just went through a re-write
just improved modularity.
Err . . . well . . . I know why I changed from numToChar to numToCodePointI'd think of all people you could understand why changes are made (or not) to particular aspects of a program.
. .[and that was not really a decision of mine; something forced on me by a change in Livecode: and, to be fair, an extremely
good change] . . and I know why I am refactoring; because bloatware is not "float-my-boat-ware",
but beyond that . . . not really.
-
- VIP Livecode Opensource Backer
- Posts: 9847
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Custom keyboard
Launching an external editor is a very different task from making custom keyboard to input into other programs.
About the only thing they have in common is that they involve other programs.
An external editor is a completely separate action, in which (as implemented in MC) is entirely modal, freezing local execution until the editor is exited. This is very with-the-grain in terms of linking stdin and stdout in Unix pipelines.
A keyboard requires both process's event loops to be running, and to maintain full duplex communication between them, complicated by the nuances of GUI text editing (such as knowing within LC when a user clicks outside an input field in the other program). Deep, heavy stuff.
Personally, given the complexity involved, I wouldn't attempt making a custom keyboard for use in other apps using anything other than the OS-prescribed APIs for that. And even then I'd have to think twice about it, because I'd be writing different LCB code for every platform I'd want to support, since all their APIs are different.
About the only thing they have in common is that they involve other programs.
An external editor is a completely separate action, in which (as implemented in MC) is entirely modal, freezing local execution until the editor is exited. This is very with-the-grain in terms of linking stdin and stdout in Unix pipelines.
A keyboard requires both process's event loops to be running, and to maintain full duplex communication between them, complicated by the nuances of GUI text editing (such as knowing within LC when a user clicks outside an input field in the other program). Deep, heavy stuff.
Personally, given the complexity involved, I wouldn't attempt making a custom keyboard for use in other apps using anything other than the OS-prescribed APIs for that. And even then I'd have to think twice about it, because I'd be writing different LCB code for every platform I'd want to support, since all their APIs are different.
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
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Custom keyboard
well, if you wouldn't I certainly wouldn't: too many kids to stuff with English to even beginI wouldn't attempt making a custom keyboard for use in other apps
the cognitive effort before an attempt.
Re: Custom keyboard
Did not realize that Richard, but I probably should have arrived at the same point. Lets see if I now have the chain of events down...
1. call the external editor
2. suspend the dev environment
3. save the script from the external editor
4. voodoo applying the saved file to the script of the object you were writing for
5. ? profit ??
Although, I don't think the project Thierry was working on works on that principle, but I will leave that for him to reveal (or not).
I still think it should be possible to do the virtual keyboard thing probably using only Lc, if I get a chance I'll look into it this weekend, but no promises.
1. call the external editor
2. suspend the dev environment
3. save the script from the external editor
4. voodoo applying the saved file to the script of the object you were writing for
5. ? profit ??
Although, I don't think the project Thierry was working on works on that principle, but I will leave that for him to reveal (or not).
I still think it should be possible to do the virtual keyboard thing probably using only Lc, if I get a chance I'll look into it this weekend, but no promises.
-
- VIP Livecode Opensource Backer
- Posts: 9847
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Custom keyboard
Probably not, nor Trevor's. Moving beyond the old modal way MC used into something more fluid is a bit of work, but necessary for modern expectations, which is why LC didn't bother putting the old MC method into their IDE.bogs wrote: ↑Fri Nov 08, 2019 12:26 amDid not realize that Richard, but I probably should have arrived at the same point. Lets see if I now have the chain of events down...
1. call the external editor
2. suspend the dev environment
3. save the script from the external editor
4. voodoo applying the saved file to the script of the object you were writing for
5. ? profit ??
Although, I don't think the project Thierry was working on works on that principle, but I will leave that for him to reveal (or not).
Probably not on mobile, which seems to be what the OP is looking for. But if you can do it for desktop it might make a good learning tool.I still think it should be possible to do the virtual keyboard thing probably using only Lc, if I get a chance I'll look into it this weekend, but no promises.
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
I'd have no way to test for mobile anything heh, but I do think it is interesting enough a problem to test out on the rig.
-
- Livecode Opensource Backer
- Posts: 9444
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Custom keyboard
My personal fantasy consists of being able to select a text-editor from within a stack,
and subsequent to that ALL keyDown and keyUp signals would be trapped by
BOTH the stack and the text-editor.
OR, that a selected subset of keyDown and keyUp signals would be sent to the text-editor,
while ALL would be trapped by the stack.
and subsequent to that ALL keyDown and keyUp signals would be trapped by
BOTH the stack and the text-editor.
OR, that a selected subset of keyDown and keyUp signals would be sent to the text-editor,
while ALL would be trapped by the stack.
Re: Custom keyboard
Hi Sir,bogs wrote: Although,
I don't think the project Thierry was working on works on that principle
You're right; it's a different thinking.
Actually quite the opposite of old technics.
The main idea is to have a tiny "script oriented IDE" - not sure if it's the best English definition
because that's where I spend most of my time (scripting).
I had already made such a tool more than 10 years ago with komodo for one of my customer.
Today I'm doing it with BBEdit.
Otherwise not *was* but *is* , and I'm using it for my work, right now.
Code: Select all
, but I will leave that for him to reveal (or not).
I'll add a page on my site to explain the core concept
followed by screenshots to see it in action.
About sharing this tool,
it will take some time mainly because of few followers
plus being active on projects which put some food in my plate...
Enjoy your day,
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
I'm training my cat for debugging before anything else....bogs wrote:being active on projects which put some food in my plate...
Look forward to the big reveal my friend
Be well
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
Whoa, for a second, I thought you had found a picture of OUR cat
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Custom keyboard
The cat obviously admires a photo of a desktop machine with an attached mouse.
shiftLock happens