It is most likely that you do not actually want to "disable" the
hardware interrupt, even if you can. This is (only partly...) because, in the x86 architecture, there aren't enough interrupt channels to go around. Hardware interrupt channels are therefore necessarily shared.
Ergo, you must deal with the matter in software.
The latter is the essence of
Thor 2.0's approach: allow the interrupt to happen, then allow Linux to figure out (as it inevitably does...) that this is an interrupt coming from the "keyboard" device,
then direct its response to a dummy routine.
Now ... having said all of
that, do I seriously think that this is
really what you intend to do or should do (even though you are discussing this on a "kernel" sub-forum)?
N-O!
(As in:
"not only 'no' but ...")
My guess is that you are
probably "merely" concerned with suppressing the keyboard's effect on a particular user-land [i]process.[/o] And,
if my guess is correct, that will translate to a signal that is presented to that process, and therefore you probably want to deal with it
(only...!) there.
My caution is that, when you touch the
kernel, you by definition affect the
entire system. Do you seriously wish to do that? I doubt!
And there's more! What if the keyboard in question is a
USB keyboard? Oops... the hardware interrupts are no longer involved at all, and yet, Linux
will properly recogize it to be "a keyboard," and will present the same effects to your user-land program. If this possibility frustrates the effectiveness of your present approach, then it follows that your present approach is
(as I politely expect that it is...) a gigantic red-herring.
Am I, in saying this, "making a fool of you in public?"
Heck, no! Setting aside for the moment the very real possibility that I might be 150% wrong, "the digital computer doth make fools of us all."