Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial keybind customization work, note this is only configurable in the settings json but you can do things like:
See the enum for all key binds.
Note: While I replaced all the UI Keybind calls in the two main docs for windows this is largely a POC commit. I also show two examples of how this could be done. One is where the view directly accesses a model data type, it is a bit cleaner IMOP but not exactly binding to the VM:
ToolTip="{Binding Converter={StaticResource KeyBindToDescriptionConverter}, ConverterParameter={x:Static ui:KEY_BIND.RunScript}}"
Key="{Binding SaveGesture, Mode=OneTime, Converter={StaticResource KeySequenceToGestureConverter}}"
(with SaveGesture added to the VM)You will also note some stupidity where I have to bind both Key and Modifiers separately, this is unavoidable I believe (as Gesture is not a dependency property).
Assuming you want this let me know which style you prefer ill update all the ones I can find in the code and update the PR.
Note: AvalonEdit does not support key bind changes easily either. We can add binds but not really remove (I believe). I can make a PR on it though to add that support if we want to proceed to allow rebinding those too.
Closes #272