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

WASM: Reading console input does not work #304

Open
mortbopet opened this issue Sep 24, 2023 · 2 comments
Open

WASM: Reading console input does not work #304

mortbopet opened this issue Sep 24, 2023 · 2 comments

Comments

@mortbopet
Copy link
Owner

On https://ripes.me/ - to reproduce, run the ConsoleReading.s example and Run the processor.
Once prompted in the console, and the user types characters into the console, pressing Enter does not return control to the processor. The user is still able to pause running by reclicking Run, so not a critical error.

@paramsiddharth
Copy link

Hi @mortbopet, just wanted to ask, is this issue planned to be fixed anytime soon?

@mortbopet
Copy link
Owner Author

Not as far as I know - so it's free to be picked up in case you want to look into it!

federicovilla55 added a commit to federicovilla55/Ripes that referenced this issue May 2, 2024
The issue mortbopet#304 is related to WASM console input not working, as by pressing Enter, Return or Backspace key nothing happens. This was due to how those commands were handled: first it was checked that their text was non empty, then their keys were checked with the elements of the `Qt::Key` enumeration. The problem is that in WebAssembly the events related to those keys have an empty text, therefore the reported problem. I modified the logic behind the evaluation of those commands: in the `Console::keyPressEvent(QKeyEvent *e)` method there is an enumeration that used to handle just the arrow keys and the default case; I propose to handle the Return, Enter and Backspace keys differently from the rest of the commands, without checking if their related text is empty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants