Keyboard Driver problem




Keyboard Driver problem

Postby Marty Geist » 12. Apr 2017, 00:31

Hi All;

I got past the Interrupt and the Multiple Interrupt problems.. Great !!

Now to get Past the Keyboard Driver Problems,

it shows..

kernel.cpp: (. text+0x24a): undefined reference to 'KeyboardDriver::KeyboardDriver(InterruptManager*)'
Error 1.

I suspect it is again in my Spelling or when I copy something that something goes amiss..

Any Suggestions as to where to Look, in what file.. Would be appreciated !!!

I got it fixed, but not in the usual way, I had made a copy of the file port.h and I cleaned up (deleted) all of the commented out lines, making the file look better.. Since I had changed only it, I didn't want to do a make clean..
In making the copy of the file, I had to close and re-open Kate.. Bringing in the new and the old file I had made of port.h..
While re-Make-ing port.o, I didn't want to do a make clean so I removed the old port.o file and making a new one..

It complained when I re-ran make run that each of the .o files were corrupted, so I remade them Individually and after doing so I NO LONGER had a Problem with making kernel.o, which I thought was going to complain about the same error as I have shown above, but it didn't..

So, now I get "KEYBOARD INTERRUPT 0x00" when I press a key, I changed the message slightly, Also for some reason When I use Your char* foo print foo , Routine the type of output it shows is : "KEYBOARD IN1ERRUPT 0x00"..
So, I just used the regular Printf command.. I don't know why that is, but I am happy that it at least WORKS!!

I just figured out what the "1" was in my printf output, So I changed the Message to read the same as what Algorithman had and Now the program Works Prefectly..

So, I can "Map out my Keyboard"" THANK YOU !!

I got all of the "codes" that You had in Your Sources file, plus a few more..
I looked at the Various Ascii codes listing, and what You have Doesn't match what they show..
Is there a formula for converting keyboard Ascii to what You have in Your Listing or do I need to just try them out a few at a time, At present I don't need Capitals, but most of the rest, like above the Numbers and what is to the Right of the letter rows..

THANK YOU Marty
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12

by Advertising » 12. Apr 2017, 00:31

Advertising
 

Re: Keyboard Driver problem

Postby algorithman » 12. Apr 2017, 12:18

messages starting with
(. text+...):
are from the linker
undefined reference means it can't find the implementation of that function or method.
So either you misspelled it in the .h or .cpp
or you forgot to add the corresponding .o object file in the makefile
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Keyboard Driver problem

Postby algorithman » 12. Apr 2017, 12:23

The keycode <-> character mapping is really device-specific. My keyboard is german, so for example I have z and y switched compared to english keyboard keycodes.
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Keyboard Driver problem

Postby Marty Geist » 12. Apr 2017, 15:44

Hi All;

Algorithman, Thank You for the Information, especially about the linker..

"" My keyboard is german, so for example I have z and y switched compared to english keyboard keycodes. ""

Yes, I already knew this, but I see Looking ahead in the Part 7 Video, that You have more of the codes Worked out..
So that is no problem, I am just Glad that I got the Keyboard fully Working..

I have entered the keycodes that You show in first Part 7, and they mostly all work as they are supposed to, except for when I try to enter a sentence, like You did..
Hello YouTube and It displays this instead, Hello YOUTUBE..

So, my first question is what are the about 5 codes at the end of the Keyboard codes list..

case 0xA6: case 0x36: Shift = true; break;
and so forth, I am typing all of the above from Memory, and so the lines are not Exactly as You have them in the Listing/Video..

What are the Keycodes that are held true or false doing or used for, since I am using as You know An American Keyboard and You are using a German Keyboard, knowing the differences might help me see where my problem exists (Is it in my code or in the keycodes ??)

After the Second Shift, then all the Letters are CAPS and stay that way, and I am Not invoking Caps Lock..

THANK YOU Marty
Last edited by Marty Geist on 13. Apr 2017, 12:44, edited 1 time in total.
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12

Re: Keyboard Driver problem

Postby Mixony » 13. Apr 2017, 07:36

the cases where he sets bool shift to true are when he detects shift press and when he sets them to false is when he detects shift release.
Two for each because there are two shifts.
Have you moved if key<0x80 into default case because with if key<0x80 surrounding you will never really get any key release. :D
Mixony
 
Posts: 24
Joined: 12. Mar 2017, 08:18

Re: Keyboard Driver problem

Postby Marty Geist » 13. Apr 2017, 12:42

Hi All;

Mixony, Thank You for Your Answer, I went and Looked back at what i had and I had the if (key < 0x80) After the default: and outside of the printf(foo); loop..

It still does the same thing.. Any other ideas ??

THANK YOU Marty
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12

Re: Keyboard Driver problem

Postby Marty Geist » 15. Apr 2017, 11:35

Hi All;

I don't think the problem is with the Keyboard or port files, but it might/maybe with either or both how or what I have set up in either Linux Mint or Virtual box that isn't correct..

Since it works the first instance but not the second instance of pressing the Shift key..
It wouldn't work at all (I would think) if either of these files were typed wrong..

I am looking for any ideas or suggestions, and in my setting up of both Linux Mint and Virtual box that could be the cause of the Problem..

Now my above assumption could be all Wrong..

I have downloaded a different opsys and re-configured it reloaded Virtual box and it makes NO difference, So, then it must be something in my code that is Not correct, I just don't know where to LOOK..

Well, I found sort of something..

If I type a Capital "W" then the next letter Will be a Capital, so far of what I have checked it is only the "w" that does this, I can make it a small letter if I do another shift with the next letter, then it will go back to being a small letter..

I have re-typed in the Line for the W letters.. Still the same thing..

THANK YOU Marty
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12

Re: Keyboard Driver problem

Postby Mixony » 17. Apr 2017, 19:24

Have you found problem. Can you post code to github, pastebin or something so others can check it.
Mixony
 
Posts: 24
Joined: 12. Mar 2017, 08:18

Re: Keyboard Driver problem

Postby Marty Geist » 18. Apr 2017, 02:27

Hi All;

I thought I had posted an Answer earlier, But, I must have hit a wrong button..

I have sort of Found the problem..

On my Dell Keyboard, and I have tried more than one Keyboard.. If I use the Left Shift key it works Just fine, And shifts and unshifts as it's supposed to..
But,
If I use the Right Shift key it will shift to a Capital Letter, but, NOT shift Back to a small Letter, unless I use the other key for unshifting..

I have no idea why this is..

THANK YOU Marty
Marty Geist
 
Posts: 15
Joined: 5. Apr 2017, 22:12



Similar topics

USB Driver for keyboard
Forum: Keyboard & Mouse
Author: saad
Replies: 1

Return to Keyboard & Mouse

Who is online

No registered users

cron