Page 1 of 1
JIS Keyboard vs US Keyboard
Posted: Fri Aug 18, 2006 6:23 am
by kenneth_phough
I wrote a approximate map of my keyboard but it doesn't seem to work. Because the laptop I am using for development is Japanese, the keyboard is a JIS keyboard but I wrote an approximate keyboard map for a US keyboard layout. I thought it would work....but it kinda didn't. the letters work but some of the symbol keys don't. For example if I press teh key next to the semicolon key I get a semicolon when I should get a back slash. How can I fix this? I happen to come a cross an interesting documentation on using JIS keyboards in Mac OS 8. it said that I would need to translate the ASCII keycode I get to the appropriate JIS keycode. I haven't really considered that because (to tell the truth) I'm not really sure how my keyboard works. I understand how a US keyboard works but not an JIS. I also searched JIS keyboard maps and I wrote a keyboard layout following that map but when I tested it, all the ASCII letters where shifted to the right.
Thanks,
Kenneth
Posted: Fri Aug 18, 2006 11:43 am
by gaf
For example if I press teh key next to the semicolon key I get a semicolon when I should get a back slash.
According to
this site the JIS keyboard standard merely extends the US scan-code set by five keys. One of these keys seems to be backslash. It should create scan-code 0x73, which is normally not used on a US layout. Most probably you just have to add these scan-codes to your table..
regards,
gaf
Posted: Sat Aug 19, 2006 1:20 am
by kenneth_phough
Thanks for the link.
I noticed something extremely strange. On my laptop, the [^] key (0x0D) send (0x07) instead which is [6]. The keyboard works on the OS I'm deving on but not the OS I'm deving. Also the [@] key (0x1A) returns keycode 0x03 which is [2]. I don't seem to be able to find a definition to why this is happening on the internet. Would anyone know what might be the problem or a site/documentation that might explain why?
Thanks,
Kenneth
Posted: Sat Aug 19, 2006 3:36 am
by kenneth_phough
PROBLEM SOLVED!
It was bochs that was causing the problem. So no apparant reason I wrote my operating system to a floppy and booted my computer from that floppy to see what it would look like and to my suprise the keyboard worked exactly the way it should work. Now I've got to read the bochs documentations to figure out why this happens with bochs.
Cheers,
Kenneth