Re: 4gl keyboard mapping?
Posted in 1997
Peter Lancashire wrote: > > Jim Kistler wrote: > > > > Anyone know how to modify the keyboard mapping in a 4gl form? > > > > Cathy Kipp's book "Programming Informix SQL/4GL....." mentions the keys > > that are used while adding and changing data in a form......control-a, > > control-d, etc.... > > ....and then says: "Unfortunately, short of re-mapping your keyboard, > > these keys cannot be redefined." > > (see pp 349-350) > > > > How about "tab" for next field, "Shift-Tab" for previous field and > > dedicate the "up/down" and "right/left" arrows to more traditional word > > processor editing tasks?.......then I want to pick some key other than > > "ESC" for saving the modified record. > > > > Has anyone done (or "dreamed") this? > > You can do some of this in 4GL using the OPTIONS statement: OPTIONS HELP KEY F1, INSERT KEY F2, DELETE KEY F3, NEXT KEY F4, PREVIOUS KEY F5, ACCEPT KEY F10 You can also trap alternate keys for some of this in input statement ON KEY clauses and manually simulate the operation. The editor keys, unfortunately, are sacrosanct. The best thing that you can do for allowing the users to edit large text fields is to export the text to a temp file and execute an external editor for the user to use. You can use the DBEDIT, EDITOR, and/or VISUAL environment variables to determine the user's prefered editor, write the data to a temp file, RUN the editor passing the name of the temp file, when the editor exits read back the contents and replace the field data. Art S. Kagel