Key lock
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Key lock
Hi.
You can trap "rawKeyDown" and "rawkeyUp".
That should prevent anything the user does.
Craig
You can trap "rawKeyDown" and "rawkeyUp".
That should prevent anything the user does.
Craig
Re: Key lock
Be careful where you put that, like a frontScript, or at least remember where.
Craig

Craig
Re: Key lock
Thanks for the answer
Can you give me an example of the code that causes them not to be able to press the windows start key?
Can you give me an example of the code that causes them not to be able to press the windows start key?
Re: Key lock
You can only prevent pressing keys on the keyboard INSIDE of your standalone!
We can NOT control anything outside your app, like the Windows key or whatever...
We can NOT control anything outside your app, like the Windows key or whatever...
Re: Key lock
Is it possible to prevent the mouse from moving outside the stack boundaries?
Re: Key lock
No.
Your message contains 3 characters.
You need to enter at least 10 characters.
Your message contains 3 characters.
You need to enter at least 10 characters.
Re: Key lock
Yes. Here is a piece of the solution. It will prevent the cursor from moving past the right of the card window:Is it possible to prevent the mouse from moving outside the stack boundaries?
Code: Select all
on mouseMove x,y
if item 1 of the mouseLoc > the right of this cd - 20 then set the screenmouseLoc to x - 20 & "," & y + the top of this stack
end mouseMove
Craig
Last edited by dunbarx on Tue Aug 13, 2024 8:59 pm, edited 3 times in total.
Re: Key lock
Klaus.
Craig
???Your message contains 3 characters.
You need to enter at least 10 characters.
Craig
Re: Key lock
LiveCode.
The handler I gave is not perfect. System and LC timing will not prevent a fast movement of the mouse from penetrating that border. It will prevent moderate motion, however. The arbitrary values of "20" in the handler just give LC some breathing space. If you reduce those values, you can set up closer to the border, but the ability to blast through increases.
Anyone know how to "Speed up" the reaction time for this handler?
Craig
The handler I gave is not perfect. System and LC timing will not prevent a fast movement of the mouse from penetrating that border. It will prevent moderate motion, however. The arbitrary values of "20" in the handler just give LC some breathing space. If you reduce those values, you can set up closer to the border, but the ability to blast through increases.
Anyone know how to "Speed up" the reaction time for this handler?
Craig
Re: Key lock
Klaus.
Where did that come up?
Craig
Where did that come up?
Craig
Re: Key lock
See attached screenshot...
Re: Key lock
Klaus.
Well, since you are a moderator I assumed you saw something I did not. Anyway, I do not see that in my thread. Did you delete it?
Craig
Well, since you are a moderator I assumed you saw something I did not. Anyway, I do not see that in my thread. Did you delete it?
Craig
Re: Key lock
OK, I will explain this very slowly... 
I wanted to respond to the namely posting with just "no."
But the forum software does not allow words shorter than 10 characters, therefore that warning appeared
on top of the entry field as seen in my screenshot. So I simply added this error text to satisfy the forum software.
This has nothing to do with being a moderator or no, this will also happen to you in that case!

I wanted to respond to the namely posting with just "no."
But the forum software does not allow words shorter than 10 characters, therefore that warning appeared
on top of the entry field as seen in my screenshot. So I simply added this error text to satisfy the forum software.
This has nothing to do with being a moderator or no, this will also happen to you in that case!