Performance improvement: Buffer key layouts in an NSDictionary, to avoid computing keycode -> character associations redundantly.