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

Esc key overloaded #81

Closed
Christopher-Chappell opened this issue Sep 27, 2023 · 9 comments
Closed

Esc key overloaded #81

Christopher-Chappell opened this issue Sep 27, 2023 · 9 comments

Comments

@Christopher-Chappell
Copy link

I see when I use the help keys command that the "Escape" key is mapped to "Esc", as it should be. However, if I actually use the "Esc" key in practice, it just takes me out of the session to the ZTI prompt. Is there a way to change the exit session to prompt use of the key or set an additional keyboard sequence to send the escape key?

The place I find I need this most is sending the escape character (for some reason ¢) to the OMVS shell in order to send signals to a program running. I think it always maps that to the escape key on the keyboard, and by the time I realize I need to use it, I'm already locked out of sending commands because of some long-running process in the foreground.

@najohnsn
Copy link
Member

Are you saying you want to map the Esc to the ¢ character? And you want to do this because that's what you're used to?

@najohnsn
Copy link
Member

Or is this a KEYLOCK issue?

@Christopher-Chappell
Copy link
Author

I want to send the "esc" character to the 3270 session instead of leaving the session. the cent character is just a placeholder in OMVS from what I can tell

@najohnsn
Copy link
Member

Okay. I see what's going on. The OMVS panel shows this:

ESC=¢

And in IBM Personal Communications, the Esc key defaults to being [sys attn]. (there isn't a 3270 Esc key)

In zti, ATTN is mapped to Ctrl+C:

KEYS:
 ATTN           - Ctrl+C or Alt+A

So, I think you want to press Ctrl+C instead of Esc.

@Christopher-Chappell
Copy link
Author

Christopher-Chappell commented Oct 12, 2023

So, I think you want to press Ctrl+C instead of Esc.

That puts me into OMVS Subcommand mode if I try it.

Are you sure [sys attn] and [attn] are the same?

@najohnsn
Copy link
Member

That puts me into OMVS Subcommand mode if I try it.

That meets your expectation, right?

Are you sure [sys attn] and [attn] are the same?

Pretty sure. I haven't seen an [attn] in pcomm.

@Christopher-Chappell
Copy link
Author

I'll have to see if I can resurrect pcomm somewhere, but I remember I used to be able to use a character on my keyboard to insert the "escape sequence" character in the prompt, represented by the cent sign, which if I followed up with a C I could send a SIGINT to stop the running process in the foreground.

@najohnsn
Copy link
Member

@stilwelb helped me translate this...

As I said in a comment above, you see ESC=¢ in the OMVS panel. What I didn't understand is that is just a character (which is configurable) that is specially handled in OMVS send control characters to the program:

3270 Keys                                                        
---------                                                        
                                                                 
   Enter           In the shell with data at the command line:   
                   If the final character is not an escape       
                   character, pressing Enter appends a <newline> 
                   character to the data.  To pass an escape     
                   sequence, for example <ESC>-D, without a      
                   <newline> character following it, repeat the  
                   escape character at the end of the sequence:  
                   <ESC>-D-<ESC>.                                
                                                                 
                   In the shell with no data at the command line:
                   Pressing Enter scrolls output forward if the  
                   screen is full.                               
                                                                 
                   In subcommand mode: Pressing Enter processes  
                   the data in the command line as a subcommand. 

In that example above, you would actually enter ¢D¢ on the command line.

My guess is that you had previously mapped the Esc key in PCOMM to ¢. I don't know what terminal emulator you are using, but you basically want a way to type ¢ using your terminal emulator. Using Windows terminal, I can turn on NumLock, then hold down Alt and press 0162 on the number pad and that produces ¢. Clearly, that is not convenient. Maybe your terminal emulator allows you to map the Esc key to ¢?

My suggestion is that you don't assign the OMVS character to one that does not appear on your keyboard. It just makes things difficult - but that's up to you. Depending on what you do, maybe a backtick (`) would be a better choice? You can use that if you start OMVS like this:

TSO OMVS ESC('`')

Let me know if this is a sufficient answer. If so, we can close this out.

@Christopher-Chappell
Copy link
Author

I tried TSO OMVS ESC('`') and it works! I wonder if there is a way to change the default for that. I did not set that up originally that I know of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants