How to Use the Spacebar to Move Between PDF Form Fields in Adobe Acrobat
Question details
The user wants to configure a PDF form so that pressing the spacebar automatically shifts the text input focus to the next designated form field.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Typing a continuous sentence across multiple split text fields in an interactive PDF form.
- Observed behavior
- The user needs a method to override the default spacebar function (which types a space) and use it instead as a trigger to jump to the next field.
Ensure you are using Adobe Acrobat Pro or a PDF editor that supports JavaScript execution and advanced form field properties, as you will need to apply a custom keystroke script.
Apply a Custom Keystroke Script to the Text Field
Add a JavaScript snippet to the form field's properties to intercept the spacebar input and automatically shift the cursor focus to the next field.
By utilizing Adobe Acrobat's custom keystroke event, you can detect when the user presses the spacebar and immediately redirect their cursor to another specified field. This is especially useful for forms that force users to write letters or words in individual boxes.
In Adobe Acrobat, enter 'Prepare Form' mode. Right-click the first text field where the user will start typing, and select 'Properties'.
Navigate to the 'Format' tab. In the 'Select format category' drop-down menu, choose 'Custom'.
In the Custom Keystroke Script box, enter the following code: if (event.change == " ") { event.rc = false; this.getField("Text2").setFocus(); }
Replace 'Text2' in the script with the exact, case-sensitive name of the next text field you want the cursor to jump to. Click 'OK' and close the properties window to test the form.

Fill and Manage PDF Forms Seamlessly with WPS Office
While custom JavaScript provides advanced control in Adobe Acrobat, WPS Office offers a highly intuitive, lightweight PDF editor for all your standard form-filling and document management needs. Effortlessly fill out interactive PDFs, navigate fields, and add signatures without complex configurations.
- 1. Open Your PDF Form: Download and install WPS Office, then open your interactive PDF form using the built-in WPS PDF editor.
- 2. Navigate and Fill Fields: Click on the highlighted text fields to start entering your information. You can use the 'Tab' key to instantly jump to the next available field.
- 3. Save and Export: Once your form is filled out, click 'Save' or export the completed PDF document to securely share it with others.

Frequently Asked Questions
Can I use the Tab key instead of the Spacebar to move between PDF form fields?
Yes. By default, pressing the Tab key moves your cursor to the next form field based on the document's predefined tab order. The spacebar script is a specialized workaround primarily used when splitting a continuous sentence across multiple separate boxes.
Why isn't my custom keystroke script working in Adobe Acrobat?
Ensure that JavaScript is enabled in your Adobe Acrobat preferences (Edit > Preferences > JavaScript). Additionally, check that the field name referenced in your script (e.g., 'Text2') exactly matches the target field's name, as JavaScript is highly case-sensitive.
How do I create a document-level JavaScript function in Acrobat?
Go to 'Tools', select 'JavaScript', and then choose 'Document JavaScripts'. Here, you can define a reusable function and call it within your individual form field keystroke events, rather than pasting the full script into every single field.




