hotkey-config #1
@@ -182,8 +182,8 @@ namespace ClipForge
|
||||
QualityLabel.Text = $"{s.VideoQuality}%";
|
||||
FramerateCombo.SelectedIndex = s.Framerate == 30 ? 0 : 1;
|
||||
StartupToggle.IsOn = IsStartupEnabled();
|
||||
if (HotkeyRecorderText != null)
|
||||
HotkeyRecorderText.Text = HotkeyHelper.ToDisplayString((uint)s.HotkeyModifiers, (uint)s.HotkeyVirtualKey);
|
||||
if (HotkeyRecorderButton != null)
|
||||
HotkeyRecorderButton.Content = HotkeyHelper.ToDisplayString((uint)s.HotkeyModifiers, (uint)s.HotkeyVirtualKey);
|
||||
}
|
||||
|
||||
// --- STARTUP WITH WINDOWS ---
|
||||
@@ -255,8 +255,9 @@ namespace ClipForge
|
||||
{
|
||||
if (_isRecordingHotkey) return;
|
||||
_isRecordingHotkey = true;
|
||||
HotkeyRecorderText.Text = "Press any key...";
|
||||
this.KeyDown += OnHotkeyCaptureKeyDown;
|
||||
HotkeyRecorderButton.Content = "Press any key...";
|
||||
HotkeyRecorderButton.Focus(FocusState.Programmatic);
|
||||
HotkeyRecorderButton.KeyDown += OnHotkeyCaptureKeyDown;
|
||||
}
|
||||
|
||||
private void OnHotkeyCaptureKeyDown(object sender, KeyRoutedEventArgs e)
|
||||
@@ -280,9 +281,9 @@ namespace ClipForge
|
||||
|
||||
var ok = _hotkeyService.UpdateHotkey(mod, vk);
|
||||
var display = HotkeyHelper.ToDisplayString(mod, vk);
|
||||
HotkeyRecorderText.Text = ok ? display : display + " (in use?)";
|
||||
HotkeyRecorderButton.Content = ok ? display : display + " (in use?)";
|
||||
|
||||
this.KeyDown -= OnHotkeyCaptureKeyDown;
|
||||
HotkeyRecorderButton.KeyDown -= OnHotkeyCaptureKeyDown;
|
||||
_isRecordingHotkey = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user