Friday, August 24, 2007
Friday, August 24, 2007    

If you ever build a prototype where you need onKeyUp and onKeyDown for navigation, and you'd like to provide a timer for the onKeyDown to produce automated scrolling, etc. you can do something in XP to help with it.



Say you'd like to use the up and down arrow keys... and onKeyDown you check if its a press & hold, run an interval & do your own thing. Do this:


  • Control Panel > Accessibility Options
  • Use Filter Keys (selected)
  • Click on Settings for Use Filter Keys (button)
  • Filter Options: check "Ignore repeated keystrokes"
  • Click on Settings for Ignore repeated keystrokes
  • Set to 0.5 seconds
What happens is that auto-repeat will be turned off. Any key pressed will not respond to an onKeyDown until that 0.5 seconds elapses (the SAME key). If you typed "abc" each would work normally. Two keys in a row of the same key will be ignored unless the timer expires first.


This is a HUGE pain in the ass if you are testing and then want to code, etc. I basically need to turn it on when I want to test. And then turn it off again when I want to code again. But its a big help I have found.


0 Comments:

Post comment

gotoAndStop( topOfPage );