Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control codes >128 #15

Open
hcsaustrup opened this issue May 13, 2024 · 1 comment
Open

Control codes >128 #15

hcsaustrup opened this issue May 13, 2024 · 1 comment
Labels
adaptation New or already existent adaptation help wanted Extra attention is needed

Comments

@hcsaustrup
Copy link

Hi!

I'm working on a configuration for the Enterprise running IS-DOS, and I've run into a minor issue; am I right in assuming that you can't specify control/navigation codes above 127? I believe the delete-right code produced on the Enterprise is 160, so I'm not sure how to specify that in the .cf file.

Regards,
HC

@MiguelVis MiguelVis added adaptation New or already existent adaptation help wanted Extra attention is needed labels Jun 6, 2024
@MiguelVis
Copy link
Owner

Hi @hcsaustrup.

Valid values for control characters are:

# Legal control characters are:
# ^A..^Z ^[ ^\ ^] ^^ ^_ -> 1..31
# ^?                    -> 127

Anyway, you could modify the CrtIn() function in the adaptation file you are using as follows:

/* Input character from the keyboard
   ---------------------------------
   All program input is done with this function.

   Translate some key bindings.

   int CrtIn(void)
*/
CrtIn()
{
	int ch;

	switch(ch = CrtInEx()) {
		case 160 :   /* 160 == DEL */
			return DEL;
	}
	
	return ch;
}

So TE will translate 160 dec into 127 dec and the ini file should read:

key.right = "^?"

You could use any other character control for translation if desired.

Tell me if that solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adaptation New or already existent adaptation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants