te icon indicating copy to clipboard operation
te copied to clipboard

Control codes >128

Open hcsaustrup opened this issue 9 months ago • 1 comments

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

hcsaustrup avatar May 13 '24 11:05 hcsaustrup

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.

MiguelVis avatar Jun 06 '24 14:06 MiguelVis