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

Keyboard Update #407

Merged
merged 14 commits into from Oct 26, 2016
Merged

Keyboard Update #407

merged 14 commits into from Oct 26, 2016

Conversation

jp2masa
Copy link
Member

@jp2masa jp2masa commented Jul 12, 2016

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

…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)
@charlesbetros
Copy link
Member

Why add ScanMap class when we already have ScanMapBase?

@jp2masa
Copy link
Member Author

jp2masa commented Jul 12, 2016

Because ScanMapBase is in HAL and cannot be accessed from User(Kernel.cs)

@charlesbetros
Copy link
Member

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.

@mterwoord
Copy link
Contributor

@jp2masa The scanmap should go in Cosmos.System. If you add a keyboard layout there, you can specify it in your kernel.

@fanoI
Copy link
Contributor

fanoI commented Jul 13, 2016

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!

@charlesbetros
Copy link
Member

That's what I was thinking. A keyboard class or Culture setting or something.

On Jul 13, 2016, at 8:04 AM, fanoI notifications@github.com wrote:

I think that all scan maps things should remain at HAL 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!


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@jp2masa
Copy link
Member Author

jp2masa commented Jul 13, 2016

So is it supposed to create a new project on ring System?

@jp2masa
Copy link
Member Author

jp2masa commented Jul 13, 2016

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)

@mterwoord
Copy link
Contributor

I still feel things are made more complex than necessary at this point..
Just move the scanmap implementations to the System ring, and you can specify them on the kernel.

@jp2masa
Copy link
Member Author

jp2masa commented Jul 18, 2016

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)

@mterwoord
Copy link
Contributor

Don't move the ScanMapBase, just move the implementations.

@ghost
Copy link

ghost commented Jul 21, 2016

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 Keyboard.SetKeyboardLayout(KeyboardLayouts.Azerty) and have an if statement to determine what ScanMapBase to use based on the enum value?

@mterwoord
Copy link
Contributor

Possible, but more work to adjust laster on.

@jp2masa
Copy link
Member Author

jp2masa commented Jul 21, 2016

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?

@jp2masa jp2masa mentioned this pull request Aug 22, 2016
@fanoI fanoI merged commit 1a7aed0 into CosmosOS:master Oct 26, 2016
@jp2masa jp2masa deleted the KeyboardUpdate branch October 28, 2016 19:27
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.

None yet

4 participants