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

Fix console text input recording keypresses when minimised with hotkey #29

Closed
wants to merge 1 commit into from

Conversation

MickWPM
Copy link

@MickWPM MickWPM commented Oct 8, 2020

When using the hotkey to hide the console the command input field continues capturing input (including ENTER which will submit the text for action). When opening it again it will have the junk captured and the show/hide hotkey character as appliable.

This fix disables the command input field when hidden and clears the text in the input field and reenables it when toggled open (clearing text could also be a toggleable option).

Disabled command input field when hidden - prevents text capture when opening/hiding with hotkey
@MickWPM MickWPM changed the title Update DebugLogManager.cs Fix console text input recording keypresses when minimised with hotkey Oct 9, 2020
@MickWPM
Copy link
Author

MickWPM commented Oct 9, 2020

Fix for reported bug #30

@MickWPM
Copy link
Author

MickWPM commented Oct 9, 2020

As per comment in report:
Note this clears the console text input on open/closing to remove the hotkey character input. Downside of this is user is no longer able to type something in the input field, minimise the console, reopen the console and have the initial typed text preserved. This may or may not be desired functionality.

A toggle to clear text on open could be added however additional code would be needed to clear the hotkey character from the input text each time it is closed as the hotkey character would be recieved prior to the console closing.

@yasirkula
Copy link
Owner

Thank you for the PR and bringing this issue to my attention. I've tried a different approach that lets us preserve the commandInputField's value: https://www.diffchecker.com/i2HPU39n. I'd like to hear your thoughts in case I'm missing something.

@MickWPM
Copy link
Author

MickWPM commented Oct 10, 2020

Yea that looks like a neat approach; wasnt aware of the UI keyboard input being captured in after update.
Thats a solid solution to a great tool!

@yasirkula
Copy link
Owner

Fixed the issue in commit d4284bf. Thank you for reviewing my code ^^

@yasirkula yasirkula closed this Oct 10, 2020
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

Successfully merging this pull request may close these issues.

2 participants