Added enabled function to enable and disable dispatching of keys.