When I was a customer, one of my very first posts to the mailing list that preceeded this forum was very similar, I was trying to use up/down to move between fields. The answer I got back in 2002 is still appropriate today, that is Genero will attempt to use the default behaviour of the front-end you are on. The appropriate key(s) for the front-ends we use is Tab and Shift-Tab, not up/down/left/right.
If you have a end-user or developer challenge you on this, get them to look at a system program that has multiple field entry, I used to use Control Panel->ODBC Settings on Windows, but nowadays I find a better worldwide example is to get them to do the following. Goto facebook.com and sign out of your account. You then get taken to a screen that allows you to Sign Up to Facebook. It has a number of fields, firstname, lastname, password, mobile number, birthdate. Now note what keys you can use to move between these fields, the answer is Tab and Shift+Tab, not up/down/left/right.
Having said that, it is possible to get close to what you want, however I would very much encourage you to respect the natural default behaviour of the front-end.
In your .4st add the following ...
<Style name="*">
<StyleAttribute name="localAccelerators" value="no"/>
</Style>
In your .4ad add the following ...
<ActionDefault name="left" acceleratorName="Left" defaultView="no" contextMenu="no"/>
<ActionDefault name="right" acceleratorName="Right" defaultView="no" contextMenu="no"/>
In your .4gl add to every dialog ...
ON ACTION left
IF FGL_DIALOG_GETCURSOR() > 1 THEN
CALL FGL_DIALOG_SETCURSOR(FGL_DIALOG_GETCURSOR()-1)
ELSE
NEXT FIELD PREVIOUS
END IF
ON ACTION right
IF FGL_DIALOG_GETCURSOR() <= (LENGTH(FGL_DIALOG_GETBUFFER())) THEN
CALL FGL_DIALOG_SETCURSOR(FGL_DIALOG_GETCURSOR()+1)
ELSE
NEXT FIELD NEXT
END IF
That will do what you want for case when widgets=Edit, behaviour may vary when focus is on widgets that don't allow text input and may require additional logic.
The key for that is using the localAccelerators style attribute that was added way back in 2.10 which controls where an accelerator key is defined in a .4ad, and has use with a particular widget, what gets priority, the 4gl action or the widgets behaviour. So in the above example, the left and right keys trigger the 4gl action, rather than the widget behaviour to move left/right one position.
Whilst I would not recommend you use it for the case above, being aware of and using that presentation style may be applicable elsewhere.
Reuben