International keyboard support (Developers)
I'm working on enabling some of my programs for Unicode. Specially, being able to decode UTF-8 and map Unicode codepoints to the machine's 256 available characters. My machine uses CP437 which is limited, but UTF-8 things already look much better.
I'd like to check my understanding of keyboard input handling.
At the lowest level, the keyboard just returns scan codes to the BIOS. The BIOS is responsible for mapping the keyboard scan codes to the built-in character set, or to special keys (F1, Alt-X, etc.)
If a machine strayed from the standard US keyboard layout or built-in character set, then the BIOS had to do the mapping for the differences. Which also becomes problematic for software that is expecting one character set and gets a different one. In that case you just get the wrong thing displayed.
Around DOS 3.x timeframe the hardware (EGA) allowed for loadable character sets (code pages) and DOS provided a mechanism to specify which should be resident. So that takes care of the limitation of the fixed code page that earlier machines (MDA/CGA) had.
On the keyboard side there is the KEYB.COM program. From what I can tell when you use KEYB it just fixes or replaces the standard BIOS handling, converting scan codes to something different from the default. It also allows for some shift/meta type operations to generate additional characters. But ultimately, the output is still going to be a value from 0 to 255 representing a character, and hopefully the matching code page for the video display is resident. Otherwise, you get the correct character but an incorrect display.
Does this sound about right?
---
mTCP - TCP/IP apps for vintage DOS machines!
http://www.brutman.com/mTCP
Complete thread:
- International keyboard support - mbbrutman, 21.01.2023, 21:44 (Developers)
- International keyboard support - marcov, 22.01.2023, 14:19
- International keyboard support - tom, 22.01.2023, 18:06
- International keyboard support - Laaca, 22.01.2023, 21:55
- International keyboard support - mbbrutman, 22.01.2023, 22:46
- International keyboard support - Laaca, 23.01.2023, 00:20
- International keyboard support - bretjohn, 23.01.2023, 18:12
- International keyboard support - mbbrutman, 23.01.2023, 23:51
- International keyboard support - bretjohn, 24.01.2023, 21:10
- International keyboard support - tom, 12.02.2023, 18:39
- International keyboard support - bretjohn, 13.02.2023, 15:35
- International keyboard support - tom, 13.02.2023, 18:36
- International keyboard support - bretjohn, 14.02.2023, 04:51
- International keyboard support - tkchia, 13.02.2023, 20:13
- International keyboard support - bretjohn, 14.02.2023, 05:05
- International keyboard support - tom, 13.02.2023, 18:36
- International keyboard support - bretjohn, 13.02.2023, 15:35
- International keyboard support - mbbrutman, 23.01.2023, 23:51
- International keyboard support - tom, 14.02.2023, 12:17
- International keyboard support - tom, 15.02.2023, 13:19
- International keyboard support - marcov, 15.02.2023, 18:14
- International keyboard support - tom, 15.02.2023, 21:31
- International keyboard support - mbbrutman, 18.02.2023, 03:17
- International keyboard support - Aitor, 06.03.2023, 01:09
- International keyboard support - mbbrutman, 18.02.2023, 03:17
- International keyboard support - tom, 15.02.2023, 21:31
- International keyboard support - marcov, 15.02.2023, 18:14
- International keyboard support - tom, 15.02.2023, 13:19
- International keyboard support - mbbrutman, 22.01.2023, 22:46