2 using System.Collections.Generic;
\r
4 using SlimDX.DirectInput;
\r
8 public class DeviceConstantConverter
\r
12 public static Key DIKtoKey( int dik )
\r
56 return Key.Backspace;
\r
92 return Key.LeftBracket;
\r
95 return Key.RightBracket;
\r
101 return Key.LeftControl;
\r
131 return Key.Semicolon;
\r
134 return Key.Apostrophe;
\r
140 return Key.LeftShift;
\r
143 return Key.Backslash;
\r
176 return Key.RightShift;
\r
179 return Key.NumberPadStar;
\r
182 return Key.LeftAlt;
\r
188 return Key.CapsLock;
\r
221 return Key.NumberLock;
\r
224 return Key.ScrollLock;
\r
227 return Key.NumberPad7;
\r
230 return Key.NumberPad8;
\r
233 return Key.NumberPad9;
\r
236 return Key.NumberPadMinus;
\r
239 return Key.NumberPad4;
\r
242 return Key.NumberPad5;
\r
245 return Key.NumberPad6;
\r
248 return Key.NumberPadPlus;
\r
251 return Key.NumberPad1;
\r
254 return Key.NumberPad2;
\r
257 return Key.NumberPad3;
\r
260 return Key.NumberPad0;
\r
263 return Key.NumberPadPeriod;
\r
290 return Key.Convert;
\r
293 return Key.NoConvert;
\r
302 return Key.NumberPadEquals;
\r
305 return Key.PreviousTrack;
\r
314 return Key.Underline;
\r
326 return Key.Unlabeled;
\r
329 return Key.NextTrack;
\r
332 return Key.NumberPadEnter;
\r
335 return Key.RightControl;
\r
341 return Key.Calculator;
\r
344 return Key.PlayPause;
\r
347 return Key.MediaStop;
\r
350 return Key.VolumeDown;
\r
353 return Key.VolumeUp;
\r
356 return Key.WebHome;
\r
359 return Key.NumberPadComma;
\r
362 return Key.NumberPadSlash;
\r
365 return Key.PrintScreen;
\r
368 return Key.RightAlt;
\r
377 return Key.UpArrow;
\r
383 return Key.LeftArrow;
\r
386 return Key.RightArrow;
\r
392 return Key.DownArrow;
\r
395 return Key.PageDown;
\r
404 return Key.LeftWindowsKey;
\r
407 return Key.RightWindowsKey;
\r
410 return Key.Applications;
\r
422 return Key.WebSearch;
\r
425 return Key.WebFavorites;
\r
428 return Key.WebRefresh;
\r
431 return Key.WebStop;
\r
434 return Key.WebForward;
\r
437 return Key.WebBack;
\r
440 return Key.MyComputer;
\r
446 return Key.MediaSelect;
\r
448 return Key.Unknown;
\r
450 public static int KeyToDIK( Key key )
\r
568 case Key.Apostrophe:
\r
571 case Key.Applications:
\r
580 case Key.Backspace:
\r
583 case Key.Backslash:
\r
586 case Key.Calculator:
\r
604 case Key.DownArrow:
\r
676 case Key.LeftBracket:
\r
679 case Key.LeftControl:
\r
682 case Key.LeftArrow:
\r
688 case Key.LeftShift:
\r
691 case Key.LeftWindowsKey:
\r
697 case Key.MediaSelect:
\r
700 case Key.MediaStop:
\r
709 case Key.MyComputer:
\r
712 case Key.NextTrack:
\r
715 case Key.NoConvert:
\r
718 case Key.NumberLock:
\r
721 case Key.NumberPad0:
\r
724 case Key.NumberPad1:
\r
727 case Key.NumberPad2:
\r
730 case Key.NumberPad3:
\r
733 case Key.NumberPad4:
\r
736 case Key.NumberPad5:
\r
739 case Key.NumberPad6:
\r
742 case Key.NumberPad7:
\r
745 case Key.NumberPad8:
\r
748 case Key.NumberPad9:
\r
751 case Key.NumberPadComma:
\r
754 case Key.NumberPadEnter:
\r
757 case Key.NumberPadEquals:
\r
760 case Key.NumberPadMinus:
\r
763 case Key.NumberPadPeriod:
\r
766 case Key.NumberPadPlus:
\r
769 case Key.NumberPadSlash:
\r
772 case Key.NumberPadStar:
\r
790 case Key.PlayPause:
\r
796 case Key.PreviousTrack:
\r
799 case Key.RightBracket:
\r
802 case Key.RightControl:
\r
808 case Key.RightArrow:
\r
814 case Key.RightShift:
\r
817 case Key.RightWindowsKey:
\r
820 case Key.ScrollLock:
\r
823 case Key.Semicolon:
\r
838 case Key.PrintScreen:
\r
844 case Key.Underline:
\r
847 case Key.Unlabeled:
\r
853 case Key.VolumeDown:
\r
865 case Key.WebFavorites:
\r
868 case Key.WebForward:
\r
874 case Key.WebRefresh:
\r
877 case Key.WebSearch:
\r