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

Cannot input command once in full screen interface #239

Open
gloria-ho opened this issue Mar 31, 2025 · 4 comments
Open

Cannot input command once in full screen interface #239

gloria-ho opened this issue Mar 31, 2025 · 4 comments

Comments

@gloria-ho
Copy link

After using the goto command to enter the full screen interface, I'm unable to input commands. I can't escape, so I'm forced to close the terminal I'm running the emulator in.
I'm on macOS (Sonoma 14.4), and I see the same issue in both the mac and VS Code terminals.

When I try to enter a command (d icsf to displace icsf info) and hit the enter key, nothing happens, and the cursor moves back to the beginning of the command line:
Image

When I hit the escape key to try to go back to the zti interface, I get these symbols:
Image

When I hit the delete key to try to delete the symbols, I get these:
Image

@najohnsn
Copy link
Member

From your description and the looks of the screenshot, it looks as if zti is not getting your keyboard input. It looks like it is being intercepted and pretty much echoed back to your screen. Is there anything odd about the way you are starting zti?

@gloria-ho
Copy link
Author

zti is being invoked programmatically from another program and that is what is causing the issue. When we run zti by itself, it works as expected.

@john-craig
Copy link

Here's a rough psuedo-code of what we're doing to cause this:

my_zti = Zti()
ati.set("SESSION", "OPERATOR")
my_zti.cmdloop()

This sequence works fine on my machine but puts Gloria in a state where inputs do not seem to work correctly.

@najohnsn
Copy link
Member

najohnsn commented Apr 1, 2025

There are various ways that programs can access "the terminal". Zti uses sys.stdin and sys.stdout. The expectation is that those are associated with the controlling terminal. And they are typically file descriptors 0 and 1, respectively. You may want to check that any code that runs before you use Zti isn't manipulated them. If necessary, you can pass in files for stdin/stdout when creating the Zti object.

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

3 participants