rem: return rval;
add: return key(ch, false);
context: key parse_key(wstring keystr){  bool sfound=false,cfound=false,afound=false;  wstring tmpstr=keystr;  key rval((wint_t) ERR, true);  init_key_tables();  while(tmpstr.size()>2 && tmpstr[1]==L'-')    {      switch(tmpstr[0])	{	case L's':	case L'S':	  sfound=true;	  break;	case L'a':	case L'A':	case L'm':	case L'M':	  afound=true;	  break;	case L'c':	case L'C':	  cfound=true;	  break;	default:#ifdef HAVE_LIBAPT_PKG	  _error->Error(_("Cannot parse key description: %ls"), keystr.c_str());#endif	  return key((wint_t) ERR, true);	}      tmpstr=wstring(tmpstr,2);    }  if(tmpstr.size()==0)    {#ifdef HAVE_LIBAPT_PKG      _error->Error(_("Invalid null keybinding"));#endif      return key((wint_t) ERR, true);    }  if(cfound && tmpstr.size()>1)    {#ifdef HAVE_LIBAPT_PKG      _error->Error(_("Sorry, control modifiers may not be used with unprintable characters"));#endif      return key((wint_t) ERR, true);    }  if(tmpstr.size()==1)    {      wint_t ch=sfound?towupper(tmpstr[0]):tmpstr[0];      // How do control-keys interact with wide characters?      if(cfound)	return KEY_CTRL(ch);      if(afound)	return KEY_ALT(ch);      return rval;    }  else    {      for(unsigned int i=0; i<tmpstr.size(); i++)	tmpstr[i]=towlower(tmpstr[i]);      map<wstring, key>::iterator found=(sfound?s_keynames:keynames).find(tmpstr);      if(found==(sfound?s_keynames:keynames).end())	return key((wint_t) ERR, true);      else	{	  rval=found->second;	  if(afound)	    rval=KEY_ALT(rval.ch);	  return rval;	}    }}