|
1 | 1 | using System.Collections.Generic; |
| 2 | +#if DEBUG |
| 3 | +using System.Diagnostics; |
| 4 | +#endif |
2 | 5 | using System.Linq; |
3 | 6 |
|
| 7 | +using BizHawk.Common.CollectionExtensions; |
| 8 | + |
4 | 9 | namespace BizHawk.Client.Common |
5 | 10 | { |
6 | 11 | public class HotkeyInfo |
@@ -133,7 +138,7 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin |
133 | 138 | Bind("TAStudio", "Show Cursor"); |
134 | 139 | Bind("TAStudio", "Select Current Frame"); |
135 | 140 | Bind("TAStudio", "Toggle Follow Cursor", "Shift+F"); |
136 | | - Bind("TAStudio", "Toggle Auto-Restore", "Shift+R"); |
| 141 | + Bind("TAStudio", "Toggle Auto-Restore", "Alt+R"); |
137 | 142 | Bind("TAStudio", "Seek To Green Arrow", "R"); |
138 | 143 | Bind("TAStudio", "Toggle Turbo Seek", "Shift+S"); |
139 | 144 | Bind("TAStudio", "Undo", "Ctrl+Z"); // TODO: these are getting not unique enough |
@@ -200,6 +205,14 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin |
200 | 205 |
|
201 | 206 | AllHotkeys = dict; |
202 | 207 | Groupings = dict.Values.Select(static info => info.TabGroup).Distinct().ToList(); |
| 208 | + |
| 209 | +#if DEBUG |
| 210 | + var bindings = dict.Values |
| 211 | + .Where(static info => !info.DisplayName.StartsWith("RA ") && !string.IsNullOrEmpty(info.DefaultBinding)) |
| 212 | + .Select(static info => info.DefaultBinding) |
| 213 | + .ToArray(); |
| 214 | + Debug.Assert(bindings.Distinct().CountIsExactly(bindings.Length), "Do not default bind multiple hotkeys to the same button combination."); |
| 215 | +#endif |
203 | 216 | } |
204 | 217 |
|
205 | 218 | public static void ResolveWithDefaults(IDictionary<string, string> dict) |
|
0 commit comments