Catch and deny key presses before they get into the view

Oktay Acikalin 13 years ago updated 13 years ago 2
How can I catch key presses and deny them before they get into the view without setting up key bindings? I want to catch all user input and then decide what to write into the view.
You can use view.settings().set("command_mode",True) to stop text from being echoed into the buffer... and... I don't know how you'd actually grab the keypresses other than having a keybinding + plugin for each key, which wouldn't be super hard but would be super annoying.
Yeah - I've also seen command_mode but I still cannot catch all chars which would be passed thru. And this is actually what I need - intercept chars which would be passed thru and eventually deny them. Setting up a huge key binding is not really an option....