Though your options seemed viable, they are unsuitable for my application as it permanently disables the keys. Our application needs a temporary disablement of certain keys and when the application quits, all those keys should be re-enabled.
I am now content with the functionality of xmodmap. By using that I am able to disable and re-enable the key board keys. I wrote a script which will launch the application after disabling the keys and enables them after the program quits.