Closed Guillermo-Santos closed 10 months ago
I'm confused, so ReadKey() returns null
when doing a tab?
No, it return '\0', the null char. That happends with tab and some others
we might not have the key map?
mmm it looks to be mapped https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System2/Keyboard/ScanMaps/USStandardLayout.cs#L41 but i have no clue dont know much about this part of cosmos
okay we might need to do what is done for space and add '\t' as the second argument
i will se if that is
okay we might need to do what is done for space and add '\t' as the second argument
it is and is not at the same time?
the space i marked on red was a tab done with console.readkey, an the dots market on blue are four tabs i did on readline...i'll have to check my console plugs again...xd
i think we had it so /t was hard coded as 4 spaces when printing in Console
i changed it to be a dynamic size depending on X cursor position.
The thing on that image is that when i made the change you pointed out readkey started to work correctly, but for some reason readline is getting the wrong char, or is making the wrong conversion.
the only difference i see is that ReadKey use Console.WriteLine to write the character, while ReadLine write directly to the textscreen (this because readline actually write to console even when output is redirected).
This was the second issue....well...i'll make a PR then
Area of Cosmos - What area of Cosmos are we dealing with?
Cosmos.System and Cosmos.HAL i guess.
Expected Behaviour - What do you think that should happen?
To write a tab on the console.
Actual Behaviour - What unexpectedly happens?
It writes a null character.
Reproduction - How did you get this error to appear?
Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?