I know it is possible (*points at omnicalc and other Detached products*) but how do you chain hooks?
You probebly check some bits to see whether they are in use, but what do you do then? You can't just stuff it into your app, thats writeback to archive, and that's evil.
Just guessing here but its that where appvars and saferam are for?
Edit: yay 500th post
[TI ASM] chaining hooks
Moderator: MaxCoderz Staff
keyhooks?
*shivers* I remember making a keyhook program that changed the value of a key pressed to another value.
I installed it on tons of kids i didnt like's calcs before a test.
They were pissed.
And probably failed.
*shivers* I remember making a keyhook program that changed the value of a key pressed to another value.
I installed it on tons of kids i didnt like's calcs before a test.
They were pissed.
And probably failed.
Currently coming up with a new signature idea... since my forum avatar changer was killed by an upgrade...
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
- elfprince13
- Sir Posts-A-Lot
- Posts: 234
- Joined: Sun 11 Dec, 2005 2:21 am
- Contact:
-
- Calc Master
- Posts: 1110
- Joined: Mon 20 Dec, 2004 10:01 pm
- Location: In the state of Roo Fearing
- Contact:
The Detached Solutions apps are specifically written to work with each other. Omnicalc checks for MirageOS and Symbolic, and if either (or both) are installed it passes the appropriate key presses to the appropriate routines in them.
If you want true universal chaing, look at my ShortCut app (which I unfortunately haven't touched in almost two and a half years). Chaining is not 100% reliable; my method borrows 6 bytes of RAM which may be in use for something else at the time (but probably aren't). If I ever do get off my lazy bum and rewrite it, I'll try to find a better method to call the other keyhook.
Essentially, it checks to see if the hook is in use when it installs its own hook. If it is, it stores the old hook page and address into its appvar. Then, when the hook fires, it does its own business and checks the appvar to see if there is a hook to chain. If there is, it checks the $83 validation byte and chains to the hook if the byte checks out.
If you want true universal chaing, look at my ShortCut app (which I unfortunately haven't touched in almost two and a half years). Chaining is not 100% reliable; my method borrows 6 bytes of RAM which may be in use for something else at the time (but probably aren't). If I ever do get off my lazy bum and rewrite it, I'll try to find a better method to call the other keyhook.
Essentially, it checks to see if the hook is in use when it installs its own hook. If it is, it stores the old hook page and address into its appvar. Then, when the hook fires, it does its own business and checks the appvar to see if there is a hook to chain. If there is, it checks the $83 validation byte and chains to the hook if the byte checks out.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am