Hi,
Still Steve Fendyke wrote:
"As an example, Japanese keyboards usually work in conjunction with a "visual aid", where the visual aid is used to select which word/symbol is meant based on the "syllables" typed in (otherwise they'd need keyboards with a few hundred thousand keys, one for each symbol/word/character)." - Oh, does that work like predictive text input on a mobile phone?
Yes (at least I think so, even though I'm not Japanese, Chinese, Korean, etc and I've never used the predictive text input on a mobile phone
).
Basic idea would be that when one key is pressed a list of all possible symbols/words is presented, sorted from most likely to least likely. As more keys are pressed this list is reduced.
Still Steve Fendyke wrote:
Once i've myself a nice table sorted out, I can't see any reason why I couldn't have one for each keyboard (for instance) and then let the user select which table to load into memory?
If you're considering Unicode (which would be needed for non-latin keyboards/characters), then you'd need tables with at least 3 bytes per scancode. You might aswell call it 4 bytes per scancode so you can have 8 flags to use for various things. So, one keyboard type becomes 4*128*4 bytes, or 2 Kb. There's at least 118 keyboard types (as supported by Microsoft:
http://www.microsoft.com/globaldev/refe ... oards.aspx), so you'd be looking at using 236 Kb just for the keyboard tables.
On top of this you'd need to support some variations, for e.g. US keyboards have two "Alt" keys, while a lot of keyboards have one "Alt" key and one "AltGr" key, where the "AltGr" is used to select completely different characters. To support this you may need to use twice as many tables...
Have a play with Microsoft's keyboard layouts (the link above) - it'll show you each keyboard layout and which characters are generated when certain control keys are pressed.
Then there's the extra "visual aids" for all languages that have one symbol per word, and support for USB keyboards (and scanning the USB devices).
Now the reason I'm dribbling on like this is that (IMHO) you're going to have to make a choice between 3 options. First option is to create a huge monolithic kernel that contains everything (ie. support for all devices including all keyboards). I don't consider this sane as the kernel would end up being too large for most computers to load!
The next option is to force your users to recompile the kernel to suit the hardware. Depending on the target audience for your OS (and if you want to distribute the kernel as source code) this might be a good approach.
The last option is to load the correct device drivers for the hardware during boot (either using a config file or auto-detecting). This is how all modern OS's (that I know of) do it. This even includes Linux for an increasing number of devices, even though they started with the previous "compile before use" option (note: Linux isn't modern, the general design of Unix & derivatives dates back to the 1960's).
So, do you
really want any keyboard and/or video code in your kernel?
Still Steve Fendyke wrote:
For now though, i might just stick with a single 'bank' of four arrays for now. I think I can handle coding that.
Despite everything I wrote, I think this is a good idea to begin with - it makes it easier to debug, etc and looks more impressive than a screen full of text that doesn't respond to the user
.
Cheers,
Brendan