Highlighted
Absent Member.
Absent Member.
344 views

[archive] Remapping Delete key in GT runtime on UNIX

[Migrated content. Thread originally posted on 19 July 2005]

We're running our runtime with -s swicthes to prevent users from terminating programs using the Delete key. However, if the user hits the Delete key during a runtime session, the runtime drops the user out to a command prompt when the runtime is closed (using a GOBACK statement from the main program).

I've tried several ways of remapping the Delete key in my cblconfig file but so far I've been unable to find a solution. Ideally I'd like to map Delete to the Edit=Delete function, but Edit=Backspace would be equally useful. I've currently put the following line in the cblconfig file:

KEYSTROKE EDIT=Delete 127

Where 127 is the ASCII value for the Delete key
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Remapping Delete key in GT runtime on UNIX

Jason,

Try the following:-

In the 'termcap' file used, change the the value for the KX key to read :KX=\177: - every TERM type that you use.

In the cblconfig file you can now manipulate the behavior of the KX key. eg KEYSTROKE EDIT=DELETE KX.

Another safeguard for user 'breakout' - add the following in the user profile or etc/profile

stty intr '^]'

Don't let this value be known (Ctrl ] )



Works for me.

Ari V N
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Remapping Delete key in GT runtime on UNIX

Many thanks for that, it's done the trick! :cool:

I didn't have to change the value in termcap, I simply added the "stty intr" line to the launch script and added the key mapping to my cblconfig.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Remapping Delete key in GT runtime on UNIX

Jason,

Without remapping the KX setting, I get non ascii characters in an alphanumeric data entry field if the delete key is used. It will be interesting to know if you have solved this danger in any other way?

Ari V N
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.