Move special handling of keypresses into the syntax dependent smarts modules