// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; using Windows.System; namespace Microsoft.CmdPal.Common.Helpers; /// /// Well-known key chords used in the Command Palette and extensions. /// /// /// Assigned key chords should not conflict with system or application shortcuts. /// However, the key chords in this class are not guaranteed to be unique and may conflict /// with each other, especially when commands appear together in the same menu. /// public static class WellKnownKeyChords { /// /// Gets the well-known key chord for opening the file location. Shortcut: Ctrl+Shift+E. /// public static KeyChord OpenFileLocation { get; } = KeyChordHelpers.FromModifiers(ctrl: true, shift: true, vkey: (int)VirtualKey.E); /// /// Gets the well-known key chord for copying the file path. Shortcut: Ctrl+Shift+C. /// public static KeyChord CopyFilePath { get; } = KeyChordHelpers.FromModifiers(ctrl: true, shift: true, vkey: (int)VirtualKey.C); /// /// Gets the well-known key chord for opening the current location in a console. Shortcut: Ctrl+Shift+R. /// public static KeyChord OpenInConsole { get; } = KeyChordHelpers.FromModifiers(ctrl: true, shift: true, vkey: (int)VirtualKey.R); /// /// Gets the well-known key chord for running the selected item as administrator. Shortcut: Ctrl+Shift+Enter. /// public static KeyChord RunAsAdministrator { get; } = KeyChordHelpers.FromModifiers(ctrl: true, shift: true, vkey: (int)VirtualKey.Enter); /// /// Gets the well-known key chord for running the selected item as a different user. Shortcut: Ctrl+Shift+U. /// public static KeyChord RunAsDifferentUser { get; } = KeyChordHelpers.FromModifiers(ctrl: true, shift: true, vkey: (int)VirtualKey.U); /// /// Gets the well-known key chord for toggling the pin state. Shortcut: Ctrl+P. /// public static KeyChord TogglePin { get; } = KeyChordHelpers.FromModifiers(ctrl: true, vkey: (int)VirtualKey.P); }