Peter, >I wasn't thinking of someone using multiple hardware keyboards. Would anyone want >to switch from one language to another by shuffling physical keyboards on their >desktop? I don't know.
If you can not touch type in the language it is useful to have a keyboard with the appropriate key caps. >The USB standard supports language IDs? Where can I find out more about that? I looked at the standard when it came out to see what of the i18n proposals that I made for ACCESS.bus were carried over. I think they had assigned 20-30 languages. >>I am not clever enough to figure out how to >>encode 6700 language in 8 bits. >Certainly not at once! The idea is that you burn in an ID the represent the keyboard layout limiting the potential number of layouts to 256. The USB driver will see that it is a keyboard and then check the language and know how to map the key codes which represent the physical key position on the keyboard the key assignment as represented by the key cap. All keyboards send codes that represent the key press / key release. The driver maps these into characters in whatever code page the driver uses or Unicode. The ID represent the key caps assignments for the physical keyboard it is not dynamic. >I convinced myself recently that specifying keyboard layouts needs to be done in terms >of identifier pairs: one ID to specify a language/writing-system-encoding >(e.g. Azerbaijani in Cyrillic Unicode vs. Azerbaijani in Roman Unicode) >together with a particular keyboard layout (where a given layout determines >a mapping from keystroke sequences to codepoints, and might possibly be used >for more than one writing system). The system the I developed for ACCESS.bus had a main keyboard layout. This would be French AZERTY, French Swiss, French Canadian, Russian, Russian homophonic, etc. This whold be like a script designation for fonts. The next part would be the numeric pad layout. Finally would be the system/function/ime/control key layout. Some key mappings would depend on the OS use. Many Japanese systems use the US keyboards that does not make them Japanese. On the other hand if you have a Japanese thumb shift keyboard it will not only have different language mapping but a very different set of system keys. The driver not only has to decode the key states but the thumb shifts must be timed. Carl