use hb_keyChar(), some other corrections