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

Terminal not closing itself on | (Pipe) click #2

Open
Chillu1 opened this issue Oct 7, 2020 · 0 comments
Open

Terminal not closing itself on | (Pipe) click #2

Chillu1 opened this issue Oct 7, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@Chillu1
Copy link
Owner

Chillu1 commented Oct 7, 2020

Since I changed how the terminal open itself from "Event.current.Equals(Event.KeyboardEvent(ToggleHotkey)"
To "Input.inputString.Equals(ToggleHotkey)", the close functionality became a bit more buggy, since Event.current was parsed only once (?), while inputString is there for longer. So it changes state multiple times.

I changed it in the first place because Event.current doesn't work with keys like Pipe (|) on Norwegian keyboard (?).

if (Input.inputString.Equals(ToggleHotkey) || Input.GetButton("Terminal"))
{
SetState(TerminalState.OpenSmall);
initial_open = true;
}
else if (Input.inputString.Equals(ToggleFullHotkey))
{
SetState(TerminalState.OpenFull);
initial_open = true;
}

else if (Input.inputString.Equals(ToggleHotkey))
{
ToggleState(TerminalState.OpenSmall);
}
else if (Input.inputString.Equals(ToggleFullHotkey))
{
ToggleState(TerminalState.OpenFull);
}

@Chillu1 Chillu1 added the bug Something isn't working label Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant