I'm guessing you are using FileMaker on Windows. On a Mac, the enter key that's part of the main keyboard is named "return" and the enter key on the numeric keypad is labeled "enter". On windows, they have the same name, but they are not the same key and don't enter the same code when you press them. FileMaker refers to these keys as though they are on a Mac keyboard even if you are using windows.
If you define your field as a number field instead of text, pressing return will not start a new line of text. You can set field behavior so that pressing tab, return and/or enter moves the cursor to the next field in the tab order. In Filemaker 11, you'll find this in the Inspector under the data tab.
You can also use script triggers to capture and process each keystroke. The script you associate with this trigger can be written to check for and detect when the return, or enter key is pressed and move the cursor to the next field or do any other action needed.
> Say the user entered a number in a field, and then instead of having to use the mouse to click a button - they could press enter?
If you have FMP v11, you can set up an OnLayoutKeystroke script trigger with the following basic script:
If [ Code (Get (TriggerKeystroke )) = 10 or Code (Get (TriggerKeystroke )) = 13 ]
Perform Script // Specify the script that you attached to the button
If the user then presses either of the Enter keys on a Windows keyboard, the script will run as if they had clicked the button.
> Is it possible to have the cursor jump out of the field after a certain amount of characters - eg if they enter a 7 digit number, then they can press enter without the enter button creating another line in the field?
Set up an OnObjectModify script trigger on the field with the following basic script:
If [ Length (your_table::your_field) ≥ 7 ]
Set Field [ your_table::your_field ; Left ( artists::name ; 7 ) ]
If the user enters 7 characters exactly, the cursor jumps out of the field. If the user tries to enter more than 7 characters, the cursor jumps out of the field and the excess characters are removed so that there are never more than 7 characters in the field.
Hope this helps.