These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Java code to disable advancing with arrows on keyboard?

jdchevy
Registered: Dec 8 2010
Posts: 1

I'm designing an interactive PDF, and it's important that the navigation is controlled through the navigation buttons we've designed. I've figured out how to disable click advancing when in full screen mode (unless a button is clicked) but can't figure out how to disable the arrow keys on my keyboard. Any suggestions?
 
Thanks!
 
Joel

My Product Information:
Acrobat Pro 10.0, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Not possible with JavaScript.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

maxwyss
Registered: Jul 25 2006
Posts: 255
It may have side effects, but you could do this:

1. Create a document-wide variable (for example var moveOnOk = 0 ; ).

2. In the navigation buttons set that variable to 1.

3. In the pageClose event evaluate that variable; if it is greater than 0, allow moving on, if not, send the user back to the page he came from. That would look somewhat like this:

if (moveOnOk > =) {
moveOnOk = 0 ;
} else {
this.pageNum = // you may try this.pageNum
}


and that should do it.

I believe to remember having such a situation, and in order to absolutely make sure that the next page is not reached, we inserted a very small blank page between every document page.