I've come to find out that using the Control X to determine the Capslock keypress doesn't work a Rich Edit has the current focus. Can anyone think of a workaround to this? I'm in a pickle!
I've come to find out that using the Control X to determine the Capslock keypress doesn't work a Rich Edit has the current focus. Can anyone think of a workaround to this? I'm in a pickle!
I've been trying all the input-based extensions I'm aware of and nothing seems to work. This is a total bummer! I've also been exploring a way to test if caps lock is active or inactive, rather than the button being pressed, but have come short. Any help is GREATLY appreciated. This is a tricky issue in my program.
Using the Control X I created a workaround but I'm trying to figure something out. As it stands, this is what I have:
-Control X Caps Lock is on: Turn on Control X Flag 1
-Control X Caps Lock is off: Turn off Control X Flag 1
-Control X Flag 1 is on
+Only one action when event loops
=ACTION A
-Control X Flag 1 is off
+Only one action when event loops
=ACTION B
As it stands, ACTION B is triggered instantly at the start of the frame, since caps lock is off. After that, whenever caps lock is toggled the actions play out accordingly. I'd like the first action to only trigger when the key is pressed but that isn't possible due to the way Rich Edit objects are programmed. If I could find a work around to not initiate, or hide, that initial triggering of the event at the start of the frame, things would be perfect. Putting time limits and things dont work either because once the time limit is reached, the action then triggers anyway, not needing the button to actually be pressed.
If anyone has a trick to get this working, I'd be in your debt!
A solution has been found! Thought I'd post it in case anyone else needs this info in the future.
To have an action trigger upon press of the Caps Lock key while the Rich Edit object has the focus, without the action triggering at the start of the frame, create the following two events using Control X and a List object:
-( Control X ): Caps Lock is on
+Only one action when event loops
=(List Object) Add line "Caps On"
=[OTHER ACTION YOU NEED WHEN CAPS IS ON]
-( Control X ): Caps Lock is off
+List Line Text$( "List", List Nb Lines( "List" ))
+Only one action when event loops
=(List Object) Add line "Caps Off"
=[OTHER ACTION YOU NEED WHEN CAPS LOCK IS OFF]