Cosmos
Cosmos copied to clipboard
Wrong key maping while booted from USB on old laptop
Area of Cosmos - What area of Cosmos are we dealing with?
When I'm booted from bootable usb made with rufus on old laptop (Elitebook2530p)
Expected Behaviour - What do you think that should happen?
When I press for example A it writes A not enter
Actual Behaviour - What unexpectedly happens?
When I press A os recive enter not A and if I press other key os don't do nothink
Reproduction - How did you get this error to appear?
When I create bootable USB with rufus.A is enter but other keys does nothing at most cases. I tried it on my old laptop HP elitebook 2530p. I tried it on far better computer and on it works fine what to do? has cosmos some minimum requiments to run on some device? I tried virtualbox because my old pc can't run vmware and keys was fine.
Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?
User Kit
If you can try adding an external PS/2 keyboard and test it like so.
Hello BlitzWolfMatthew I haven't PS/2 keyboard or port on laptop But I have this problem on every "old" laptop. On new laptops it works ok
So I tested to run example when I create new csharp cosmos project on 3 HP laptops and on 1 dell precision On every HP laptop "cosmos OS" don't works On dell precision laptop works with no problems
Maybe your keyboard doesn't support PS/2 or doesn't use PS/2. I really wish Cosmos supported USB
How wrong is the key mapping? Is it just the difference of a few keys or is pressing A mapped to Enter for example?
How wrong is the key mapping? Is it just the difference of a few keys or is pressing A mapped to Enter for example?
You can't write anything. First only few keys(around 3 to 6) respond to press and they are mapped to totally other characters such as £] <... After few presses only responds "A" and is mapped to enter but when I press "a" (enter) it responds twice(like double enter)
I found that more keys are mapped to dot(.)
Sounds like a duplicate of https://github.com/CosmosOS/Cosmos/issues/1801 . Could you get the information i requested in the other issue?
Yes, there they are
What keys are being mapped incorrectly? All are wrong(A is enter and most of other keys are maped to. /[...)
I am assuming this is on real hardware? Is the keyboard an actual ps/2 keyboard?
Real hardware i'm booted from USB on real hardware. And I'm using laptop integrated keyboard
I mean can you do what I requested in https://github.com/CosmosOS/Cosmos/issues/1801#issuecomment-856101567 ?
I mean can you do what I requested in #1801 (comment) ?
Hello I tried that but I have user kit and I can't edit that file. So when I put that code (Console.WriteLine("(PS/2 Keyboard) Current scan code set: " + GetScanCodeSet());)
in the BeforeRun()
in the main file of kernel i've got error: Error CS0103 The name 'GetScanCodeSet' does not exist in the current context
what to do?
The easiest would be to install the devkit.
If that is not an option, you can copy the code from https://github.com/CosmosOS/Cosmos/blob/6638f8e357951e930d78f99e1daa3f8e2a789f9b/source/Cosmos.HAL2/PS2Keyboard.cs#L93 and create your own local version of the method. You will need the value from to Global.PS2Controller
. Hopefully you can call your local version and it would work.
The easiest would be to install the devkit.
If that is not an option, you can copy the code from
https://github.com/CosmosOS/Cosmos/blob/6638f8e357951e930d78f99e1daa3f8e2a789f9b/source/Cosmos.HAL2/PS2Keyboard.cs#L93 and create your own local version of the method. You will need the value from to
Global.PS2Controller
. Hopefully you can call your local version and it would work.
Hello I'm doing somethink wrong or I can't call local version PS2keyboard
But when I call only initialize methodni can found I can't write anithink on input is only writed: "Input: ,
Can you post your code?
Change the namespace of your version, so that you can address it.
Can you make video how to do that because I don't know how...
Thanks
change line 8 from namespace Cosmos.HAL
to namespace keyboardTest1
change line 8 from
namespace Cosmos.HAL
tonamespace keyboardTest1
done but i've got 9 errors:
add using Cosmos.HAL;
at the beginning of the file.
@quajak
add
using Cosmos.HAL;
at the beginning of the file.
6 errors
maybe I could create custom classtype (I don't know correct name) named it like abc and add there own initialize method so i can call it from main script. I think that i must define every global and core object with Cosmos.core because cosmos.hal has same
UPDATE: just one error: i fixed wrong references between core and hal
UPDATE: 0 errors that was for cosmos.hal
What's the result when you let it run?
Do this to Initialize keyboard
Do this to Initialize keyboard
So i need to remove lines above red lines?
write what is red underlined :) - but NASM exiting with code 1 (if you have PS2Keyboard and KeyboardBase files) :( ---------- Původní e-mail ---------- Od: bumboo001 @.> Komu: CosmosOS/Cosmos @.> Datum: 1. 6. 2022 21:31:22 Předmět: Re: [CosmosOS/Cosmos] Wrong key maping while booted from USB on old laptop (Issue #2079) "
" Do this to Initialize keyboard keyboardinitialize (https://user-images.githubusercontent.com/105986123/171485198-17d0ee7a-b792-4f77-b18b-2d874e4be6e9.jpg) " So i need to remove lines above red lines?
— Reply to this email directly, view it on GitHub (https://github.com/CosmosOS/Cosmos/issues/2079#issuecomment-1144050361), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AZITQS2ZTGJXV64YVZI3D3TVM63AHANCNFSM5NIORM7Q) . You are receiving this because you commented. Message ID: <CosmosOS/Cosmos/ @.***> "
What is the nasm error?