You can't. Your application cannot control all of this.
What you're looking for is what's called "
kiosk[
^]" mode in Windows. Your code cannot set this up.
Disabling the keyboard is easy enough. Unplug it.
Or, if you want to do it the hard way, you'll have to implement a a global keyboard hook and just eat the keys instead of passing them up the hook chain.