public Keys GetFirstKeyForAction(Action action) { // sometimes a more convenient version of the above, when labelling GUI elements with their key (usually the GUI can only display one key) // this saves checking for empty lists etc EnsureKeyLookup(); string text = action.ToString(); if (!m_KeyLookup.ContainsKey(text)) { return(Keys.None); } return(m_KeyLookup[text][0]); }
public List <Keys> GetKeysForAction(Action action) { return(GetKeysForAction(action.ToString())); }