Page 1 of 1

Keyboard problems

Posted: Thu Jan 16, 2003 1:34 pm
by PIPO
Hi everyone.


I made a keyboard driver, with brazilian key map. and i've got a problem:

when i press ? key, if in map array i have this: '?' it prints me a wierd symbol on a grey background ( i do not modify the backgroung wich is black for other chars ) and it is flickering. If in the array I put the ascii code for ? char, i get the ? flickering on grey background.

I'm using fritzos printf function ( the which cames with pk0.7 ).

Any one can tell me why this is happens?

Re:Keyboard problems

Posted: Thu Jan 16, 2003 2:35 pm
by jrfritz
Well, that key in ASCII may mean soemthing other than that character.....(I am the manager of FritzOS)...

I don't know why its doing that, and the only guess I can make is that character means something else for the video card....

Re:Keyboard problems

Posted: Thu Jan 16, 2003 5:14 pm
by eL JeDi
I've got the same problem but with ? and ?! chars. I'm working on it.

here is my key map, if anyone wants to try it:

char unsh[] = { NULL, ESC,'1','2','3','4','5','6','7','8','9','0',0x60,0xA1,BKS,TAB,'q','w','e','r','t','y',
'u','i','o','p',0,'+',ENTER,0,'a','s','d','f','g','h','j','k','l','?',0,0,0,0x87,'z','x','c','v','b','n','m',',','.','-',0,0,0,' ',0,AF1,AF2,AF3,AF4,AF5,AF6,AF7,AF8,AF9,AF10,0,0,AHOME,AUP,APGUP,'-',ALEFT,'5',ARIGHT,
'+',AEND,ADOWN,APGDN,AINS,ADEL,0,0,0,AF11,AF12 };

This is spanish key map for unshifted keys.

0x87 is char ?
0x60 is '
0xA1 is ?

Re:Keyboard problems

Posted: Thu Jan 16, 2003 5:57 pm
by Tim
Try 'unsigned char' instead of 'char', or use literal numeric values instead of '?'. C doesn't handle non-US characters well... :(

Re:Keyboard problems

Posted: Fri Jan 17, 2003 12:56 am
by Pype.Clicker
what actually happens is that neither Linux nor Windows (and your development env. is probably one of those) use the same characters table as BIOS do. So if you compile your file with a '?' (=0xE7 in Linux) in it and then try to display it from a bootsector, you'll discover that another character is on the screen (most probably a math symbol or a table-writing symbol)...

Re:Keyboard problems

Posted: Fri Jan 17, 2003 2:33 pm
by eL JeDi
Hi,

Tim, it was a mistake form my copy+paste. I use unsined char in the array.

I'm going to try to change BIOS ASCII code to the same as linux uses before to fix my kernel to boot from grub.