Hello,
On Fri, 8 Oct 2021 at 12:18, tom ehlert <t...@drivesnapshot.de> wrote: > > >> codepage is a display thing, essentially it's the table how to > >> convert 8-bit bytes into a visable character set, and mostly > >> unrelated to the way the keyboard driver converts scancodes into > >> bytes. > > > The Code Page and the Keyboard layout are not unrelated at all -- -- > they are HIGHLY related. > > nope. > I'm afraid they are. Because when a user presses the key (or key combination) to produce Á, what the user expects is to see Á on the screen, and not just send a scancode where you may or may not be able to see Á depending if you are lucky with the codepage. And that's why the aforementioned door from DISPLAY to KEYB goes: the actual "intelligence" for that is in KEYB, not in DISPLAY. > it's not uncommon for germans to use US-ASCII keyboards (QWERTY). > other use german keyboards (QWERTZ). > > in both cases the codepage is 437 (BIOS default) or 858 (with €), but > Y and Z are swapped. > The key stuff here (what you were wondering about) is whether the user may want to switch the codepage (not the keyboard layout) dynamically or not. Because if you don't (as maybe the case in Germany, or Spain), MKEYB will suffice, but if you do, then you need this dynamic codepage switch on keyboard that MKEYB does not implement (afaik). I myself find a good reason to be able to issue a hot switch codepage: there used to be some dumb ancient programs that implemented a TUI that was heavy cp-437 dependent: they used to mix bix characters that mixed single-lined, and double-lined borders, which is NOT available in 850/858. They actually looked horrible under 850/858, and you may want to sacrifice the extended european symbols (such as Á) in order to have a better viewing of those programs. When will the hot codepage change happen? The preferred way: the user issues a CHCP DOS call and NLSFUNC is loaded. Another popular, memory saving, but inconsistent manner: issue a MODE CON CP SELECT. In both cases, CON (=DISPLAY) will try to change codepage on both screen and keyboard, and will fail on keyboard if KEYB does nos implement the call, thus leaving the system potentially inconsistent. How often will this happen? I suggest to look at the sources of KEYBOARD.SYS. Henrique used to implement lots of lots of different codepages for the same keyboard distribution. I guess in many of such cases, a hot codepage switch would be a popular issue. Aitor
_______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user