From 41803cc63227830df6f10228196e2ea8f5266c64 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Thu, 16 Jan 2025 20:54:23 +0000 Subject: [PATCH] [PTRun]Add hotkey to the show telemetry event (#36869) --- .../PowerLauncher.Telemetry/Events/LauncherShowEvent.cs | 7 +++++++ .../launcher/PowerLauncher/ViewModel/MainViewModel.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/launcher/PowerLauncher.Telemetry/Events/LauncherShowEvent.cs b/src/modules/launcher/PowerLauncher.Telemetry/Events/LauncherShowEvent.cs index de9d8a9f98..8882c5f0ec 100644 --- a/src/modules/launcher/PowerLauncher.Telemetry/Events/LauncherShowEvent.cs +++ b/src/modules/launcher/PowerLauncher.Telemetry/Events/LauncherShowEvent.cs @@ -12,6 +12,13 @@ namespace Microsoft.PowerLauncher.Telemetry [EventData] public class LauncherShowEvent : EventBase, IEvent { + public LauncherShowEvent(string hotkey) + { + Hotkey = hotkey; + } + + public string Hotkey { get; private set; } + public PartA_PrivTags PartA_PrivTags => PartA_PrivTags.ProductAndServiceUsage; } } diff --git a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs index 3f19949fd3..9559674981 100644 --- a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs +++ b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs @@ -466,7 +466,7 @@ namespace PowerLauncher.ViewModel // Don't trigger telemetry on cold boot. Must have been loaded at least once. if (value == Visibility.Visible) { - PowerToysTelemetry.Log.WriteEvent(new LauncherShowEvent()); + PowerToysTelemetry.Log.WriteEvent(new LauncherShowEvent(_settings.Hotkey)); } else {