From 58aa64b5d603d3216a67a2bd38ada984b039ad45 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 16 Oct 2020 14:45:46 +1000 Subject: [PATCH] Add some missing keys to DirectInput alt-keyboard-layout mode maybe THIS will fix the crashes --- src/BizHawk.Bizware.DirectX/Keyboard.cs | 66 +++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/BizHawk.Bizware.DirectX/Keyboard.cs b/src/BizHawk.Bizware.DirectX/Keyboard.cs index f03eaa25c0..b3d0c1090c 100644 --- a/src/BizHawk.Bizware.DirectX/Keyboard.cs +++ b/src/BizHawk.Bizware.DirectX/Keyboard.cs @@ -268,11 +268,22 @@ namespace BizHawk.Bizware.DirectX WinFormsKey.X => DInputKey.X, WinFormsKey.Y => DInputKey.Y, WinFormsKey.Z => DInputKey.Z, +// WinFormsKey. => DInputKey.AbntC1, +// WinFormsKey. => DInputKey.AbntC2, WinFormsKey.OemQuotes => DInputKey.Apostrophe, + WinFormsKey.Apps => DInputKey.Applications, +// WinFormsKey. => DInputKey.AT, +// WinFormsKey. => DInputKey.AX, WinFormsKey.Back => DInputKey.Backspace, WinFormsKey.OemPipe => DInputKey.Backslash, +// WinFormsKey. => DInputKey.Calculator, WinFormsKey.Capital => DInputKey.CapsLock, +// WinFormsKey. => DInputKey.Colon, WinFormsKey.Oemcomma => DInputKey.Comma, + WinFormsKey.IMEConvert => DInputKey.Convert, + WinFormsKey.Delete => DInputKey.Delete, + WinFormsKey.Down => DInputKey.DownArrow, + WinFormsKey.End => DInputKey.End, WinFormsKey.Oemplus => DInputKey.Equals, WinFormsKey.Escape => DInputKey.Escape, WinFormsKey.F1 => DInputKey.F1, @@ -291,25 +302,80 @@ namespace BizHawk.Bizware.DirectX WinFormsKey.F14 => DInputKey.F14, WinFormsKey.F15 => DInputKey.F15, WinFormsKey.Oemtilde => DInputKey.Grave, + WinFormsKey.Home => DInputKey.Home, + WinFormsKey.Insert => DInputKey.Insert, + WinFormsKey.KanaMode => DInputKey.Kana, + WinFormsKey.KanjiMode => DInputKey.Kanji, WinFormsKey.OemOpenBrackets => DInputKey.LeftBracket, WinFormsKey.LControlKey => DInputKey.LeftControl, + WinFormsKey.Left => DInputKey.LeftArrow, WinFormsKey.LMenu => DInputKey.LeftAlt, WinFormsKey.LShiftKey => DInputKey.LeftShift, + WinFormsKey.LWin => DInputKey.LeftWindowsKey, + WinFormsKey.LaunchMail => DInputKey.Mail, + WinFormsKey.SelectMedia => DInputKey.MediaSelect, + WinFormsKey.MediaStop => DInputKey.MediaStop, WinFormsKey.OemMinus => DInputKey.Minus, + WinFormsKey.VolumeMute => DInputKey.Mute, +// WinFormsKey. => DInputKey.MyComputer, + WinFormsKey.MediaNextTrack => DInputKey.NextTrack, + WinFormsKey.IMENonconvert => DInputKey.NoConvert, WinFormsKey.NumLock => DInputKey.NumberLock, + WinFormsKey.NumPad0 => DInputKey.NumberPad0, + WinFormsKey.NumPad1 => DInputKey.NumberPad1, + WinFormsKey.NumPad2 => DInputKey.NumberPad2, + WinFormsKey.NumPad3 => DInputKey.NumberPad3, + WinFormsKey.NumPad4 => DInputKey.NumberPad4, + WinFormsKey.NumPad5 => DInputKey.NumberPad5, + WinFormsKey.NumPad6 => DInputKey.NumberPad6, + WinFormsKey.NumPad7 => DInputKey.NumberPad7, + WinFormsKey.NumPad8 => DInputKey.NumberPad8, + WinFormsKey.NumPad9 => DInputKey.NumberPad9, +// WinFormsKey. => DInputKey.NumberPadComma, +// WinFormsKey. => DInputKey.NumberPadEnter, +// WinFormsKey. => DInputKey.NumberPadEquals, WinFormsKey.Subtract => DInputKey.NumberPadMinus, + WinFormsKey.Decimal => DInputKey.NumberPadPeriod, WinFormsKey.Add => DInputKey.NumberPadPlus, + WinFormsKey.Divide => DInputKey.NumberPadSlash, WinFormsKey.Multiply => DInputKey.NumberPadStar, WinFormsKey.OemBackslash => DInputKey.Oem102, + WinFormsKey.Next => DInputKey.PageDown, + WinFormsKey.Prior => DInputKey.PageUp, + WinFormsKey.Pause => DInputKey.Pause, WinFormsKey.OemPeriod => DInputKey.Period, + WinFormsKey.MediaPlayPause => DInputKey.PlayPause, +// WinFormsKey. => DInputKey.Power, + WinFormsKey.MediaPreviousTrack => DInputKey.PreviousTrack, WinFormsKey.OemCloseBrackets => DInputKey.RightBracket, + WinFormsKey.RControlKey => DInputKey.RightControl, WinFormsKey.Return => DInputKey.Return, + WinFormsKey.Right => DInputKey.RightArrow, + WinFormsKey.RMenu => DInputKey.RightAlt, WinFormsKey.RShiftKey => DInputKey.RightShift, + WinFormsKey.RWin => DInputKey.RightWindowsKey, WinFormsKey.Scroll => DInputKey.ScrollLock, WinFormsKey.OemSemicolon => DInputKey.Semicolon, WinFormsKey.OemQuestion => DInputKey.Slash, + WinFormsKey.Sleep => DInputKey.Sleep, WinFormsKey.Space => DInputKey.Space, +// WinFormsKey. => DInputKey.Stop, + WinFormsKey.PrintScreen => DInputKey.PrintScreen, WinFormsKey.Tab => DInputKey.Tab, +// WinFormsKey. => DInputKey.Underline, +// WinFormsKey. => DInputKey.Unlabeled, + WinFormsKey.Up => DInputKey.UpArrow, + WinFormsKey.VolumeDown => DInputKey.VolumeDown, + WinFormsKey.VolumeUp => DInputKey.VolumeUp, +// WinFormsKey. => DInputKey.Wake, + WinFormsKey.BrowserBack => DInputKey.WebBack, + WinFormsKey.BrowserFavorites => DInputKey.WebFavorites, + WinFormsKey.BrowserForward => DInputKey.WebForward, + WinFormsKey.BrowserHome => DInputKey.WebHome, + WinFormsKey.BrowserRefresh => DInputKey.WebRefresh, + WinFormsKey.BrowserSearch => DInputKey.WebSearch, + WinFormsKey.BrowserStop => DInputKey.WebStop, +// WinFormsKey. => DInputKey.Yen, _ => DInputKey.Unknown }; }