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
Keyboard Update #407
Keyboard Update #407
Conversation
…t due to Rings); Fix typo in Cosmos.System.Plugs.RuntimeTypeImpl.cs; Implement op_Inequality(implemented as op_Equality and not sure if it's needed with the changes but needed it's needed by many system methods)
Why add ScanMap class when we already have ScanMapBase? |
Because ScanMapBase is in HAL and cannot be accessed from User(Kernel.cs) |
Yeah, but what I mean is you should put an abstraction layer on top of ScanMapBase rather than just creating another class as a pass-through with no functionality. |
@jp2masa The scanmap should go in Cosmos.System. If you add a keyboard layout there, you can specify it in your kernel. |
I think that all scan maps things should remain at System what is needed a function (adding it to the Console class? Or something regarding Culture?) to change keyboard layout after the kernel is started. For example I'd like for my Kernel to add a command equivalent of the DOS "keyb" now I cannot do this. I'm Italian and I have an Italian keyboard so it is an issue for me too! |
That's what I was thinking. A keyboard class or Culture setting or something.
|
So is it supposed to create a new project on ring System? |
In order to change keyboard layout, the only way on the current state would be overriding the GetKeyboardLayout method but it is of type ScanMapBase which is in HAL, and Kernel needs to be in User ring(else it gives an error) |
I still feel things are made more complex than necessary at this point.. |
It's strange that the test failed, and I don't really know why it failed(I can't relate the symbol redefined error with my changes). Also, as I already said, moving the ScanMapBase to Cosmos.System doesn't work, only creating an empty ScanMap class(on System) that inherits ScanMapBase(on HAL) |
Don't move the ScanMapBase, just move the implementations. |
Just wondering, wouldn't it be possible to use the current ScanMapBase, and when switching keyboard layouts from user ring, pass an enum that's sitting in System for the type of layout you want, for example |
Possible, but more work to adjust laster on. |
I used the TestRunner and investigated the assembly file for the kernel. In fact the symbols that nasm says that are redefined they are defined 3 times, which is a big problem. I don't know correctly, but the issue can be in IL2CPU or is it in my code? |
Fixed op_Equality and op_Inequality.
Keyboard Update: now it's possible to change keyboard layout(it wasn't due to Rings); Fix typo in Cosmos.System.Plugs.RuntimeTypeImpl.cs; Implement op_Inequality(implemented as op_Equality and not sure if it's needed with the changes but it's needed by many system methods)
Fixes #405