Precisely!
In the olden days of real mode MS-DOS, if you want to gather keystrokes from the user securely (e.g. a password) the program could simply take over the IRQ1 (keyboard interrupt) vector and that was sufficient. The extra paranoid could also revector the other interrupts (or disable interrupts entirely) and ensure they had exclusive control of the entire machine.