Example #1
0
		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;
		}
Example #2
0
		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;
		}