Octocontrabass wrote:
Those two characters are on the same key on a US English keyboard, so your hardware may be translating the key codes somehow. They can be distinguished by the shift state.
True. Normally the would be distinguished by checking if the shift key was pressed, however on the german keyboard layout both keys are on a non-shifted position. So this wouldn't work in my case.
Octocontrabass wrote:
Scan codes are not characters.
Sorry, made a blunder in my original post, the function reading from the keyboard port should assign the value to a variable named scancode, not *char.
Octocontrabass wrote:
When scan codes are more than one byte long, you will receive one byte on each IRQ and you must keep track of previous bytes to determine which key is being pressed or released. Once you know which key it is, you can translate the key press into whatever data you want.
Okay, that seems understandable. Will try it.
SpyderTL wrote:
Also, notice in the Scan Code Tables at the bottom, multi-byte codes start with 0xE0, 0xE1 or 0xF0, and no single-byte codes start with these values, so you can use these values to trigger your multi-byte read logic.
Same as Octocontrabass said: First fetch the first byte value, then determine if it belongs to a multiple-byte code or not.
Thanks a lot for your help!