Forum

KeyMapping for Word...
 
Notifications
Clear all

KeyMapping for WordPerfect

0 Posts
2 Users
0 Reactions
258 Views
(@drcrunch)
Active Member
Joined: 19 years ago
Posts: 7
Topic starter  

I am running AT4.01 as a wyse 60 and I am having some problems with the control-function keys that are necessary for some of the features in WP5.1 I have a seekey function which tells me that the keys send ascii codes of a certain number ex: control F4 sends "-125". my question is how do I remap the keys to send the proper code, they currently send nothing according to the seekey function. I have tried to modify the keymap myself but all it does is print the text -125. I tried the \\x-125 nad got another set of responses in the seeky function but not the -125 that I see with the real Wyse 60. What am I missing?

[size=1][ March 17, 2006, 11:23 AM: Message edited by: Brian T. Pence ][/size]


   
ReplyQuote
(@bpence)
Member Admin
Joined: 11 months ago
Posts: 1375
 

Kenneth,

AbsoluteTelnet is programmed with standard definitions of the wyse60 functionkeys. If your application requires specific non-standard sequences, you'll have to map them yourself.

If you want to map to a particular numeric character value, the best way is to use the hex Anotation \\xAA However, you'll have to convert the number to hex first.

For example to send 125 it would be \\x7D

however, decimal 125 (hex 7D) is the right-bracket '}' and is probably not what you want. It's possible you might need to send an escape code first:

\\x1B\\x7D

I'm not sure what 'Seekey' is or what it is trying to tell you. Do you have any documentation for that? Is it a WP51 utility or one of your system utilities? If I understood what seekey is telling you, I could help you out further.

What host system are you using?


   
ReplyQuote
(@drcrunch)
Active Member
Joined: 19 years ago
Posts: 7
Topic starter  

Seekey is a small application that came with medical manager. It gives you what the terminal is sending to the OS. When you enter esc it sends 27 and so on. When I test the other wyse terminals with the control-F4 they report as having sent "-125" control-F3 sends "-126" and so on. I have not seen any reference to negative ascii code numbers in my web searches. I could probably send you the seekey app if you are on Unix.


   
ReplyQuote
(@bpence)
Member Admin
Joined: 11 months ago
Posts: 1375
 

Well, the '-' in '-125' might be implying that the value might have overflowed a signed byte value. In that case, the value you want to use is 131 (256-125) or , converted for key mapping:

\\x83

So, you say that seekey should produce output for each byte, including escapes? What does it send for a plain F4?

AbsoluteTelnet comes built with mappings for standard Function keys, plus Shift-F# mappings. If there is a set of standard codes I can add for ctrl-F#, I'd like to add those into the standard Absolute distribution so other users can benefit.

Are there alt-F# variants as well? I seem to remember that WP needs alt variants too. I don't know if Wyse is able to produce them, though.

Brian


   
ReplyQuote
(@drcrunch)
Active Member
Joined: 19 years ago
Posts: 7
Topic starter  

F4 sends 1 67 13
f5 sends 1 68 13

The alt combos send the same. Only the control modifiers alter the code sent. Hit the Alt F4 for a try, windows still knows that one.


   
ReplyQuote
(@bpence)
Member Admin
Joined: 11 months ago
Posts: 1375
 

Did you try mapping \\x83 to F4? Does it now give you the same output in seekey?


   
ReplyQuote
(@drcrunch)
Active Member
Joined: 19 years ago
Posts: 7
Topic starter  

Very cool. Returned -125 right on the nose. So, explain to me what "overflowed a signed byte value" means. Or how you knew that "In that case, the value you want to use is 131 (256-125) or , converted for key mapping: \\x83

I have noticed that there is a gap between 77 and 100 on a lot of ascii maps.

Thanks.


   
ReplyQuote
(@bpence)
Member Admin
Joined: 11 months ago
Posts: 1375
 

A single byte (8 bits) can hold 256 different values.

If you are working with an unsigned datatype, this allows you to have the values 0 through 255

If you are working with a signed datatype, you get 0 through 127, then the values turn negative and work their way backward (-128, -127, -126, -125, -124)

And if a program takes an unsigned value and erroneously reports it as a signed datatype, then -128 really represents 128. -127 represents 129. -126 represents 130 and -125 represents 131. Or, in the more general case, subtract the negative number from 256 to get the real (unsigned) value.

So, your negative sign in -125 was the giveaway. It appeared to be an unsigned byte being displayed as a signed value. The *real* character is then 131 (decimal), and converted to hex for Absolute: \\x83

The 'gap' in the ascii map is for the C1 control codes. Two control code ranges are defined. The C0 control zone (codes 0 through 31 or \\x00 through \\x1F hex) and the C1 control zone (codes 128 through 159 \\x80 through \\x9F hex) These ranges generally do not contain printable characters and are reserved for control codes. Your control-f4 is the 4th character in the C1 set. Coincidence?

I'm working on an enhancement to the standared wyse60 keymap that contains the control-key mappings. I'll let you know when I have it done.

Brian


   
ReplyQuote
(@drcrunch)
Active Member
Joined: 19 years ago
Posts: 7
Topic starter  

Got the new Wyse60 Keymap. Saved the old one (Philosophy of the great "Justin Case")and copied the new one over to the app directory. Fires it up and it worked like a charm.

Outstanding work, the control functions are all back on line. Great to have my shortcuts back.

Thanks loads.


   
ReplyQuote
Share: