ZOSOpenTools / c3270port

A 3270 emulator
Apache License 2.0
4 stars 0 forks source link

ISPF panel characters aren't correct #6

Open gngrossi opened 1 year ago

gngrossi commented 1 year ago

c3270_ISPF_panel c3270_ISPF_panel2

gngrossi commented 1 year ago

Using ISPF, keyboard PF keys F1-F4 are not working correctly but F5-F12 are functioning. F1 yields [11~ F2 yields [12~ F3 yields [13~ F4 yields [14~

Using Keypad Menu (Ctrl-k) is available for F1-F4.

gngrossi commented 1 year ago

The ESC=¢ isn't displaying correctly when using the 3270 interface to USS. USS _3270

MikeFultonDev commented 1 year ago

@EnsonoStevenPerva reported the same problem with panel characters

MikeFultonDev commented 1 year ago

From Tom Brennan:

I don't know if this helps or not, but those "panel characters" (boxes, etc.) are sent by the host as Graphic Escape characters, preceded by x'08' to tell the terminal emulator to switch to a GE font. When that switch doesn't happen (for whatever reason), you'll see odd standard characters like the post shows.

MikeFultonDev commented 3 months ago

@gngrossi can you check this with the latest c3270? I do still see the ESC issue if I do 'tso omvs' from c3270 but the F1/2/3/4 keys work fine for me. I am using a very simple invocation of: c3270 Y:127.0.0.1:992 though.

gngrossi commented 3 months ago

@MikeFultonDev Currently running the current version: Package c3270 is already installed at the requested version: DEV.20231214_154351

What SSH client are you using?

It looks like the issue with F1-F4 function keys, and the panel characters occur with using the PuTTY ssh client. I tested with the Windows OpenSSH client without issue.

For c3270, is there a switch for writing utf-8 output? (like there is for tmux) Also, do you use/have a keyboard mapping for the Backspace and Ctrl keys?

thanks

MikeFultonDev commented 2 months ago

I use ssh on my Mac which is pre-installed with the system @gngrossi

MikeFultonDev commented 2 months ago

I see there is a -utf8 option - perhaps give that a try?

MikeFultonDev commented 2 months ago

I noticed with -utf8 it just has the following when I come in from omvs: image I don't know what is 'normal' since I don't use omvs. @gngrossi when PR #16 is integrated (which will bump the version of c3270) can you try another test of c3270?

gngrossi commented 2 months ago

@MikeFultonDev I have upgraded to the latest c3270. bash-5.2$ c3270 --version c3270 v4.2ga10 Mon May 27 15:29:10 UTC 2024 JENKINS

PuTTY Translation image

I will experiment with other PuTTY translation selections.

gngrossi commented 2 months ago

@MikeFultonDev Using the -utf8 option doesn't help regarding the line drawing (using PuTTY).

For TSO OMVS, using -utf8, I see the same result...missing the ESC=¢ (using PuTTY). image

thanks

MikeFultonDev commented 2 months ago

@gngrossi I can reproduce. I have to figure out where the character is not being mapped correctly. But - my terminal emulator doesn't want to let me type a ¢ symbol from my Mac.

Can you see if the ¢ works for you and it's just not displayed right or does it not work at all? Note you can change the escape character to something else by issuing tso omvs escape('@') (for example) to specify the @ symbol instead as a check. I am not exactly sure what the escape symbol is used for, not being an OMVS user much.

Note that the ¢ symbol is rather nasty because it's 0xA2 in ASCII and (I think) 0x4A in EBCDIC but since it's above 0x7F in ASCII it's kind of an annoying character to use.

gngrossi commented 2 months ago

@MikeFultonDev It appears the ¢ is the OMVS default escape character and one that is not on my keyboard (no surprise). Thanks for providing the escape parameter...multiple characters can be used. On Windows, in my BZ emulator and in Notepad, I can press and hold down the [Alt] key, press 0162 on the number pad and then release the [Alt] key for ¢ Using PuTTY and the OpenSSH Windows client, this sequence doesn't work.

We also use an exec called "USS" which sets F1 to be the control key for Ctrl-c or Ctrl-d functions. OMVS PF1(CONTROL) LINES(1000) SESSIONS(1) SHAREAS

I think at this point, it's probably not worth pursuing. Thoughts?

Thanks for your help on this...much appreciated.