Get input method definition from config
Convert keyval to char before checking if it's in im_keys