JIS Keyboard vs US Keyboard

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

JIS Keyboard vs US Keyboard

Post 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
User avatar
gaf
Member
Member
Posts: 349
Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany

Post 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
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Post 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
User avatar
kenneth_phough
Member
Member
Posts: 106
Joined: Sun Sep 18, 2005 11:00 pm
Location: Williamstown, MA; Worcester, MA; Yokohama, Japan
Contact:

Post 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
Post Reply