user4592357
n00b
- Joined
- Jun 14, 2017
- Messages
- 2
i'm reading tanenbaum's book. here it says that when the "shift" key is presses and then the letter "m", the os knows that the user wants an uppercase "M" rather than a lowercase "m". i'm wondering how this is handled by the cpu?
here's what i think. since both keypresses are interrupts, and "shift" keypress occurs before the "m" keypress, then at first an interrupt is raised for the "shift" key. but when the "m" is pressed...? now what? how does the cpu/interrupt handler know that it should "mix" the results of the two interrupts? is there some logic for special keys put in keyboard interrupt handler? like, "if a "shift" is pressed and if other key is pressed, detect what that key is and perform a corresponding action"?
thanks in advance
here's what i think. since both keypresses are interrupts, and "shift" keypress occurs before the "m" keypress, then at first an interrupt is raised for the "shift" key. but when the "m" is pressed...? now what? how does the cpu/interrupt handler know that it should "mix" the results of the two interrupts? is there some logic for special keys put in keyboard interrupt handler? like, "if a "shift" is pressed and if other key is pressed, detect what that key is and perform a corresponding action"?
thanks in advance