public static swi.Key ConvertKey (Key key) { key &= Key.KeyMask; var keys = key.ToString () .Split (new[] { ", " }, StringSplitOptions.None) .Select (v => (Key)Enum.Parse (typeof (Key), v)); var ret = swi.Key.None; foreach (var val in keys) { ret |= Find (val); } return ret; }
public static SWF.Keys Convert(Key key) { var keys = key.ToString() .Split(new[] { ", " }, StringSplitOptions.None) .Select(v => (Key)Enum.Parse(typeof(Key), v)); SWF.Keys ret = SWF.Keys.None; foreach (var val in keys) { ret |= Find(val); } return ret; }