AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.16k stars 2.18k forks source link

[DevTools] Allow Configure Inspect Hovered Control KeyBinding #15790

Open workgroupengineering opened 3 months ago

workgroupengineering commented 3 months ago

Is your feature request related to a problem? Please describe.

When you have multiple keyboard layouts on Windows 10-11, the "CTRL-SHIFT" key combination is associated with the action of switching keyboard layouts. This does not allow you to use Inspect Hovered Control because it is binding to the same key combination.

Describe the solution you'd like

Allow configure InspectHoveredControl KeyBinding

Describe alternatives you've considered

No response

Additional context

No response

stevemonaco commented 3 months ago

The main issues that caused me to punt on mutability of hotkeys (and why they weren't implemented in #15700 :

  1. There's no settings store for DevTools. This means in-app changes only last until the next debugging launch. You could configure in code, but that effects your entire team.
  2. There's no dialog system in DevTools, so that needs implemented or a workaround. In-place edits might be enough, but I do have other feature ideas where a small input dialog would be very useful. Any dialog needs to hidden from the DevTools Logical/Visual Trees, which https://github.com/AvaloniaUtils/DialogHost.Avalonia would support (being an overlay), but this doesn't warrant bringing in an external dependency, IMO.
  3. Not sure if the quality / naming is good enough for HotKeyConfiguration to be made public, so I left this part malleable for any future implementer.
workgroupengineering commented 3 months ago
  1. There's no settings store for DevTools. This means in-app changes only last until the next debugging launch. You could configure in code, but that effects your entire team.

To solve this problem I load DevToolsOptions from appsettings.development.json

workgroupengineering commented 3 months ago

Hi @maxkatz6, Can I do a PR? Should I make this public or implement this?