when in console, if I press a key, some interrupt controller sends code of that key to CPU, which looks into some table and than represent that keypress by printing some charracter to stdout. But, is keyboard sending an ASCII code of that key, or just some standardised code? Since there is so many languages and extra characters, OS must further translate its code into some character according to user selected scheme, I guess. I ask, becouse I am from Czech Republic, and we use some characters that do not exists in standart ASCII code. So I was thinking, if I enter this character into a console, and then print it, lets say in C++ using cin and cout, and I have set locale to Czech, stdin must actually send some non-ASCII code of the character I pressed to input stream. Am I right?
Software on the computer then interprets the scancodes, e.g. the BIOS during boot or the operating system. E.g. in Linux scancodes and shifting state are interpreted by kernel key maps that translate keycodes to 16 bit numbers, which are normally Unicode/ASCII characters.