Skip to content

Commit

Permalink
Merge pull request #14 from pyrretsoftware/axellse-4
Browse files Browse the repository at this point in the history
trying to fix backspace on linux (again)
  • Loading branch information
axellse authored Feb 16, 2024
2 parents 66e99e0 + 3e52987 commit 660d380
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Binary file modified TerminalPilot/.vs/TerminalPilot/v17/.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion TerminalPilot/OSSupport/DirectoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static char GetOsBackSpaceChar()
{
if (Environment.OSVersion.Platform == PlatformID.Unix)
{
return '';
return '?';
}
else
{
Expand Down
3 changes: 2 additions & 1 deletion TerminalPilot/Parser/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ void messagetip(string message)
while (instance.alive == true)
{
char key = Console.ReadKey(true).KeyChar;
ConsoleKeyInfo consoleKeyInfo = Console.ReadKey(true);
if (key == '\r')
{
_tempflag_linecursorleft = "";
Expand Down Expand Up @@ -151,7 +152,7 @@ void messagetip(string message)
}
}
}
else if (key == OsDirectoryManager.GetOsBackSpaceChar())
else if (consoleKeyInfo.Key == ConsoleKey.Backspace)
{
if (Console.CursorLeft > _tempflag_deletelimit | _tempflag_deletelimity != Console.CursorTop)
{
Expand Down

0 comments on commit 660d380

Please sign in to comment.