From 5938231ff2891d3ab90718a16f66aebf320ca305 Mon Sep 17 00:00:00 2001 From: vanzue Date: Wed, 29 Oct 2025 14:17:31 +0800 Subject: [PATCH 01/11] zoomit hotkey --- .../SettingsXAML/Views/ZoomItPage.xaml | 33 +++++++++++++-- .../Settings.UI/Strings/en-us/Resources.resw | 27 +++++++++--- .../Settings.UI/ViewModels/ZoomItViewModel.cs | 42 +++++++++++++++++++ 3 files changed, 94 insertions(+), 8 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml index 9b938d14a2b6..b74f48733f86 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml @@ -221,12 +221,39 @@ - + HeaderIcon="{ui:FontIcon Glyph=}" + IsExpanded="True"> - + + + + + + + + + + + + 0.1 diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index 8384be49a16e..98a55029863d 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -4881,15 +4881,32 @@ Change the break timer color using the same keys that the drawing color. The bre Record - Record video of the unzoomed live screen or a static zoomed session by entering the recording hotkey and finish the recording by entering it again. - -To crop the portion of the screen that will be recorded, enter the hotkey with the Shift key in the opposite mode. - -To record a specific window, enter the hotkey with the Alt key in the opposite mode. + Record video of the unzoomed live screen or a static zoomed session by entering the recording hotkey and finish the recording by entering it again. Record hotkey + + Configure the base hotkey for recording. Use modifier keys (Shift or Alt) to access different recording modes. + + + Full screen recording + + + Press the recording hotkey to start/stop recording the full screen or current zoom session. + + + Portion recording (crop) + + + Press this hotkey combination to select and record a specific portion of the screen. Note: XOR logic applies - if base hotkey includes Shift, it will be removed; if not, it will be added. + + + Window recording + + + Press this hotkey combination to record a specific window. Note: XOR logic applies - if base hotkey includes Alt, it will be removed; if not, it will be added. + Scaling diff --git a/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs index 9e99c0e22fd4..c7a5c449edae 100644 --- a/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/ZoomItViewModel.cs @@ -262,11 +262,53 @@ public HotkeySettings RecordToggleKey { _zoomItSettings.Properties.RecordToggleKey.Value = value ?? ZoomItProperties.DefaultRecordToggleKey; OnPropertyChanged(nameof(RecordToggleKey)); + OnPropertyChanged(nameof(RecordToggleKeyCrop)); + OnPropertyChanged(nameof(RecordToggleKeyWindow)); NotifySettingsChanged(); } } } + public HotkeySettings RecordToggleKeyCrop + { + get + { + var baseKey = _zoomItSettings.Properties.RecordToggleKey.Value; + if (baseKey == null) + { + return null; + } + + // XOR with Shift: if Shift is present, remove it; if absent, add it + return new HotkeySettings( + baseKey.Win, + baseKey.Ctrl, + baseKey.Alt, + !baseKey.Shift, // XOR with Shift + baseKey.Code); + } + } + + public HotkeySettings RecordToggleKeyWindow + { + get + { + var baseKey = _zoomItSettings.Properties.RecordToggleKey.Value; + if (baseKey == null) + { + return null; + } + + // XOR with Alt: if Alt is present, remove it; if absent, add it + return new HotkeySettings( + baseKey.Win, + baseKey.Ctrl, + !baseKey.Alt, // XOR with Alt + baseKey.Shift, + baseKey.Code); + } + } + public HotkeySettings SnipToggleKey { get => _zoomItSettings.Properties.SnipToggleKey.Value; From 380e4c62b79fb10f106112e7055e654a81fed699 Mon Sep 17 00:00:00 2001 From: vanzue Date: Wed, 29 Oct 2025 19:37:15 +0800 Subject: [PATCH 02/11] other functionality has hotkey binding magic too --- .../SettingsXAML/Views/ZoomItPage.xaml | 51 ++++++++++++--- .../Settings.UI/Strings/en-us/Resources.resw | 18 ++++++ .../Settings.UI/ViewModels/ZoomItViewModel.cs | 63 +++++++++++++++++++ 3 files changed, 123 insertions(+), 9 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml index b74f48733f86..251c3a1990e5 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ZoomItPage.xaml @@ -69,12 +69,23 @@ - + HeaderIcon="{ui:FontIcon Glyph=}" + IsExpanded="True"> - + + + + + +