adds call to preventDefault when key handled