Exemplo n.º 1
0
        /// <summary>
        /// Converts a Sce.Atf.Input.Keys to a System.Windows.Input.ModifierKeys</summary>
        /// <param name="atfKeys">AtfKeys enum</param>
        /// <returns>Converted WpfModifierKeys enum</returns>
        public static WpfModifierKeys ToWpfModifiers(AtfKeys atfKeys)
        {
            // TODO: need to verify this all works correctly
            var             modifiers = atfKeys &= AtfKeys.Modifiers;
            WpfModifierKeys result    = WpfModifierKeys.None;

            if ((modifiers & AtfKeys.Alt) > 0)
            {
                result |= WpfModifierKeys.Alt;
            }
            if ((modifiers & AtfKeys.Shift) > 0)
            {
                result |= WpfModifierKeys.Shift;
            }
            if ((modifiers & AtfKeys.Control) > 0)
            {
                result |= WpfModifierKeys.Control;
            }

            if ((atfKeys & AtfKeys.RWin) > 0 || (atfKeys & AtfKeys.RWin) > 0)
            {
                result |= WpfModifierKeys.Windows;
            }

            return(result);
        }
Exemplo n.º 2
0
        private void RegisterClientCommands()
        {
            int clientCount = m_documentClients.Length;

            // for each document client, build file/new and file/open commands
            int index = 0;

            foreach (Lazy <IDocumentClient> lazy in m_documentClients)
            {
                IDocumentClient client = lazy.Value;

                Keys newShortcut  = Keys.None;
                Keys openShortcut = Keys.None;

                if (index == 0)
                {
                    newShortcut  = Keys.Control | Keys.N;
                    openShortcut = Keys.Control | Keys.O;
                }

                string newIconName = client.Info.NewIconName;
                if ((RegisterCommands & CommandRegister.FileNew) == CommandRegister.FileNew)
                {
                    CommandService.RegisterCommand(
                        new CommandInfo(
                            new FileCommandTag(Command.FileNew, client),
                            StandardMenu.File,
                            StandardCommandGroup.FileNew,
                            clientCount > 1 ?
                            "New".Localize("Name of a command") + '/' + client.Info.FileType :
                            string.Format("New {0}".Localize(), client.Info.FileType),
                            string.Format("Creates a new {0} document".Localize("{0} is the type of document to create"), client.Info.FileType),
                            newShortcut,
                            newIconName,
                            (!string.IsNullOrEmpty(newIconName)) ? CommandVisibility.All : CommandVisibility.Menu),
                        this);
                }

                string openIconName = client.Info.OpenIconName;
                if ((RegisterCommands & CommandRegister.FileOpen) == CommandRegister.FileOpen)
                {
                    CommandService.RegisterCommand(
                        new CommandInfo(
                            new FileCommandTag(Command.FileOpen, client),
                            StandardMenu.File,
                            StandardCommandGroup.FileNew,
                            clientCount > 1 ?
                            "Open".Localize("Name of a command") + '/' + client.Info.FileType :
                            string.Format("Open {0}".Localize(), client.Info.FileType),
                            string.Format("Open an existing {0} document".Localize(), client.Info.FileType),
                            openShortcut,
                            openIconName,
                            (!string.IsNullOrEmpty(openIconName)) ? CommandVisibility.All : CommandVisibility.Menu),
                        this);
                }

                index++;
            }
        }
        // Removes a shortcut from the Keys property of all Shortcut objects
        private void RemoveShortcut(Keys key)
        {
            if (key == Keys.None)
            {
                return;
            }

            foreach (Shortcut shortcut in m_shortcuts)
            {
                if (shortcut.Keys.Contains(key))
                {
                    List <Keys> newKeys = new List <Keys>(shortcut.Keys);
                    newKeys.Remove(key);
                    shortcut.Keys = newKeys;
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Processes the key as a command shortcut</summary>
        /// <param name="key">Key to process</param>
        /// <returns>True iff the key was processed as a command shortcut</returns>
        public override bool ProcessKey(Keys key)
        {
            if (key == Keys.F1 && m_lastHoveringToolStrip != null)
            {
                foreach (var item in m_lastHoveringToolStrip.Items)
                {
                    var button = item as ToolStripButton;
                    if (button != null)
                    {
                        if (button.Selected)
                        {
                            foreach (KeyValuePair <CommandInfo, CommandControls> commandAndControl in m_commandControls)
                            {
                                if (commandAndControl.Value.Button == button &&
                                    !string.IsNullOrEmpty(commandAndControl.Key.HelpUrl))
                                {
                                    // There doesn't seem to be a way to prevent the WM_HELP message that gets generated
                                    //  during the call to Process.Start(). We can't add a filter to every Control's
                                    //  WndProc. So, let's use a static way of stopping WebHelp for a little bit.
                                    WebHelp.SupressHelpRequests = true;
                                    Process.Start(commandAndControl.Key.HelpUrl);

                                    if (m_webHelpTimer == null)
                                    {
                                        m_webHelpTimer = new DispatcherTimer {
                                            Interval = TimeSpan.FromMilliseconds(1000)
                                        };
                                        m_webHelpTimer.Tick +=
                                            (o, e) =>
                                        {
                                            WebHelp.SupressHelpRequests = false;
                                            m_webHelpTimer.Stop();
                                        };
                                    }
                                    m_webHelpTimer.Start();

                                    return(true);
                                }
                            }
                        }
                    }
                }
            }

            return(base.ProcessKey(key));
        }
        private string GetUsedByText(Keys key)
        {
            var sb = new StringBuilder();

            if (key != Keys.None)
            {
                // linearly search for a command that uses this shortcut
                foreach (Shortcut shortcut in m_shortcuts)
                {
                    if (shortcut.Keys.Contains(key))
                    {
                        sb.AppendLine(shortcut.DisplayPath + "\r\n" + shortcut.Info.Description);
                        break;
                    }
                }
            }
            return(sb.ToString());
        }
Exemplo n.º 6
0
 public static SelectMode GetSelectMode(Keys modifiers)
 {
     Sce.Atf.Input.Keys modkeys = KeysInterop.ToAtf(modifiers);
     if (ActiveControlScheme.ToggleSelection != Sce.Atf.Input.Keys.None &&
         modkeys == ActiveControlScheme.ToggleSelection)
     {
         return(SelectMode.Toggle);
     }
     if (ActiveControlScheme.AddSelection != Sce.Atf.Input.Keys.None &&
         modkeys == ActiveControlScheme.AddSelection)
     {
         return(SelectMode.Extend);
     }
     if (ActiveControlScheme.RemoveSelection != Sce.Atf.Input.Keys.None &&
         modkeys == ActiveControlScheme.RemoveSelection)
     {
         return(SelectMode.Remove);
     }
     return(SelectMode.Normal);
 }
Exemplo n.º 7
0
        /// <summary>
        /// Converts a Sce.Atf.Input.Keys to a System.Windows.Input.ModifierKeys</summary>
        /// <param name="atfKeys">AtfKeys enum</param>
        /// <returns>Converted WpfModifierKeys enum</returns>
        public static WpfModifierKeys ToWpfModifiers(AtfKeys atfKeys)
        {
            var modifiers = atfKeys & AtfKeys.Modifiers;
            var result    = WpfModifierKeys.None;

            if ((modifiers & AtfKeys.Alt) > 0)
            {
                result |= WpfModifierKeys.Alt;
            }
            if ((modifiers & AtfKeys.Shift) > 0)
            {
                result |= WpfModifierKeys.Shift;
            }
            if ((modifiers & AtfKeys.Control) > 0)
            {
                result |= WpfModifierKeys.Control;
            }

            return(result);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Converts a Sce.Atf.Input.Keys to a System.Windows.Input.ModifierKeys</summary>
        /// <param name="atfKeys">AtfKeys enum</param>
        /// <returns>Converted WpfModifierKeys enum</returns>
        public static WpfModifierKeys ToWpfModifiers(AtfKeys atfKeys)
        {
            // TODO: need to verify this all works correctly
            var modifiers = atfKeys &= AtfKeys.Modifiers;
            WpfModifierKeys result = WpfModifierKeys.None;

            if ((modifiers & AtfKeys.Alt) > 0)
                result |= WpfModifierKeys.Alt;
            if ((modifiers & AtfKeys.Shift) > 0)
                result |= WpfModifierKeys.Shift;
            if ((modifiers & AtfKeys.Control) > 0)
                result |= WpfModifierKeys.Control;

            if ((atfKeys & AtfKeys.RWin) > 0 || (atfKeys & AtfKeys.RWin) > 0)
                result |= WpfModifierKeys.Windows;

            return result;
        }
Exemplo n.º 9
0
        private void RegisterClientCommands()
        {
            var clientList = m_documentClients.Select(l => l.Value)
                             .Where(dc => dc.Info.AllowStandardFileCommands)
                             .ToList();

            // for each document client, build file/new and file/open commands
            var index = 0;

            foreach (var client in clientList)
            {
                Keys newShortcut  = Keys.None;
                Keys openShortcut = Keys.None;

                if (index == 0)
                {
                    newShortcut  = Keys.Control | Keys.N;
                    openShortcut = Keys.Control | Keys.O;
                }

                object newIconKey  = client.Info.NewIconKey;
                string newIconName = client.Info.NewIconName;
                if ((RegisterCommands & CommandRegister.FileNew) == CommandRegister.FileNew)
                {
                    CommandService.RegisterCommand(
                        new CommandInfo(
                            new FileCommandTag(Command.FileNew, client),
                            StandardMenu.File,
                            StandardCommandGroup.FileNew,
                            clientList.Count > 1 ?
                            "New".Localize("Name of a command") + '/' + client.Info.FileType :
                            string.Format("New {0}".Localize(), client.Info.FileType),
                            string.Format("Creates a new {0} document".Localize("{0} is the type of document to create"), client.Info.FileType),
                            newShortcut,
                            (newIconKey != null) ? newIconKey : newIconName,
                            ((!string.IsNullOrEmpty(newIconName)) || (newIconKey != null)) ? CommandVisibility.All : CommandVisibility.Menu),
                        this);
                }

                object openIconKey  = client.Info.OpenIconKey;
                string openIconName = client.Info.OpenIconName;
                if ((RegisterCommands & CommandRegister.FileOpen) == CommandRegister.FileOpen)
                {
                    CommandService.RegisterCommand(
                        new CommandInfo(
                            new FileCommandTag(Command.FileOpen, client),
                            StandardMenu.File,
                            StandardCommandGroup.FileNew,
                            clientList.Count > 1 ?
                            "Open".Localize("Name of a command") + '/' + client.Info.FileType :
                            string.Format("Open {0}".Localize(), client.Info.FileType),
                            string.Format("Open an existing {0} document".Localize(), client.Info.FileType),
                            openShortcut,
                            (openIconKey != null) ? openIconKey : openIconName,
                            ((!string.IsNullOrEmpty(openIconName)) || (openIconKey != null)) ? CommandVisibility.All : CommandVisibility.Menu),
                        this);
                }

                index++;
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// Process ATF message and command key by calling the base ProcessCmdKey with converted arguments,
        /// which allows this key press to be consumed by owning
        /// controls like PropertyView and PropertyGridView and be seen by ControlHostService.
        /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
        /// Returning true means that this key press has been consumed by this method and this
        /// event is not passed on to any other methods or controls.</summary>
        /// <param name="msg">ATF message to process</param>
        /// <param name="keyData">ATF key data</param>
        /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
        /// True to consume this key press, so this
        /// event is not passed on to any other methods or controls.</returns>
        protected virtual bool ProcessCmdKey(ref AtfMessage msg, AtfKeys keyData)
        {
            WfMessage wfMsg = MessageInterop.ToWf(msg);

            return(base.ProcessCmdKey(ref wfMsg, KeysInterop.ToWf(keyData)));
        }
Exemplo n.º 11
0
 /// <summary>
 /// Tests if ATF key is an input key by calling Windows IsInputKey with converted argument</summary>
 /// <param name="keyData">ATF key data</param>
 /// <returns>True iff key is an input key</returns>
 protected virtual bool IsInputKey(AtfKeys keyData)
 {
     return(base.IsInputKey(KeysInterop.ToWf(keyData)));
 }
Exemplo n.º 12
0
 /// <summary>
 /// Modifies the given collection with the given items based on standard Windows convention
 /// of using the Control key to toggle the selection of items, Shift key to add the items,
 /// and otherwise to set the selection to the items</summary>
 /// <typeparam name="T">The type of items contained in the selection</typeparam>
 /// <param name="collection">Collection of already selected items that is modified</param>
 /// <param name="items">Items to add or remove from collection, or to set the collection to</param>
 /// <param name="modifiers">Selection modifier AtfKeys</param>
 public static void Select <T>(ICollection <T> collection, IEnumerable <T> items, AtfKeys modifiers)
 {
     Input.KeysUtil.Select(collection, items, modifiers);
 }
Exemplo n.º 13
0
        /// <summary>
        /// Converts a Sce.Atf.Input.Keys to a System.Windows.Input.ModifierKeys</summary>
        /// <param name="atfKeys">AtfKeys enum</param>
        /// <returns>Converted WpfModifierKeys enum</returns>
        public static WpfModifierKeys ToWpfModifiers(AtfKeys atfKeys)
        {
            var modifiers = atfKeys & AtfKeys.Modifiers;
            var result = WpfModifierKeys.None;

            if ((modifiers & AtfKeys.Alt) > 0)
                result |= WpfModifierKeys.Alt;
            if ((modifiers & AtfKeys.Shift) > 0)
                result |= WpfModifierKeys.Shift;
            if ((modifiers & AtfKeys.Control) > 0)
                result |= WpfModifierKeys.Control;

            return result;
        }
Exemplo n.º 14
0
 /// <summary>
 /// Converts a Sce.Atf.Input.Keys to a System.Windows.Forms.Keys</summary>
 /// <param name="keys">AtfKeys enum</param>
 /// <returns>Converted WfKeys enum</returns>
 public static WfKeys ToWf(AtfKeys keys)
 {
     return (WfKeys)keys;
 }
Exemplo n.º 15
0
 /// <summary>
 /// Modifies the given collection with the given item based on standard Windows convention
 /// of using the Control key to toggle the selection of the given item, Shift key to add the
 /// item, and otherwise to set the selection to the item</summary>
 /// <typeparam name="T">The type of items contained in the selection</typeparam>
 /// <param name="collection">Collection of already selected items that is modified</param>
 /// <param name="item">Item to add or remove from collection</param>
 /// <param name="modifiers">Selection modifier AtfKeys</param>
 public static void Select <T>(ICollection <T> collection, T item, AtfKeys modifiers)
 {
     Input.KeysUtil.Select(collection, item, modifiers);
 }
Exemplo n.º 16
0
        // Removes a shortcut from the Keys property of all Shortcut objects
        private void RemoveShortcut(Keys key)
        {
            if (key == Keys.None)
                return;

            foreach (Shortcut shortcut in m_shortcuts)
            {
                if (shortcut.Keys.Contains(key))
                {
                    List<Keys> newKeys = new List<Keys>(shortcut.Keys);
                    newKeys.Remove(key);
                    shortcut.Keys = newKeys;
                }
            }
        }
Exemplo n.º 17
0
 private string GetUsedByText(Keys key)
 {
     var sb = new StringBuilder();
     if (key != Keys.None)
     {
         // linearly search for a command that uses this shortcut
         foreach (Shortcut shortcut in m_shortcuts)
         {
             if (shortcut.Keys.Contains(key))
             {
                 sb.AppendLine(shortcut.DisplayPath + "\r\n" + shortcut.Info.Description);
                 break;
             }
         }
     }
     return sb.ToString();
 }
Exemplo n.º 18
0
 /// <summary>
 /// Converts a AtfKeys value to a string</summary>
 /// <param name="k">AtfKeys value</param>
 /// <param name="digitOnly">If true, for numeric pad or digit keys, only return
 /// the number. For example, numpad0 becomes 0, and D0 becomes 0.</param>
 /// <returns>String representation of the AtfKeys value</returns>
 public static string KeysToString(AtfKeys k, bool digitOnly)
 {
     return(Input.KeysUtil.KeysToString(k, digitOnly));
 }
Exemplo n.º 19
0
 /// <summary>
 /// Returns whether or not the given modifier AtfKeys should add an item from a selection</summary>
 /// <param name="modifiers">Modifier AtfKeys</param>
 /// <returns>Whether or not the given modifier AtfKeys should add an item from a selection</returns>
 public static bool AddsSelection(AtfKeys modifiers)
 {
     return(Input.KeysUtil.AddsSelection(modifiers));
 }
Exemplo n.º 20
0
 /// <summary>
 /// Returns whether or not the given modifier AtfKeys should toggle an item from a selection</summary>
 /// <param name="modifiers">Modifier AtfKeys</param>
 /// <returns>Whether or not the given modifier AtfKeys should toggle an item from a selection</returns>
 public static bool TogglesSelection(AtfKeys modifiers)
 {
     return(Input.KeysUtil.TogglesSelection(modifiers));
 }
Exemplo n.º 21
0
 /// <summary>
 /// Determines whether or not the given AtfKeys should be considered a TextBox input and be handled
 /// by that control. For example, if this method returns true, ProcessCmdKey should return false
 /// and not call base.ProcessCmdKey.</summary>
 /// <param name="isMultiline">Whether the control (typically a TextBox or ComboBox) that received the key press is multiline</param>
 /// <param name="k">AtfKeys value</param>
 /// <returns>Whether or not the given key press should be considered a TextBox input</returns>
 /// <remarks>
 /// Some examples from a class deriving from TextBox and what its ProcessCmdKey should do:
 /// Keypress | IsInputKey | ProcessCmdKey should      | Because
 /// --------   ----------   -------------------------   --------------------------------------
 /// s          false        return false                Even if this is a command shortcut, the TextBox input takes priority.
 /// 1          false        return false                Even if this is a command shortcut, the TextBox input takes priority.
 /// F10        false        return base.ProcessCmdKey   Might be a command shortcut.
 /// Ctrl+Z     false        return base.ProcessCmdKey   Might be a command shortcut and that takes priority over the TextBox's limited undo.
 /// Ctrl+C     false        return false                The TextBox copy command takes priority.
 /// Home       true         return false                The TextBox navigation takes priority.
 /// Delete     false        return false                The TextBox navigation takes priority. Why does IsInputKey() return false?! .NET bug?
 /// Up         false        return false                We want our IsInputKey override to receive this.
 /// </remarks>
 public static bool IsTextBoxInput(bool isMultiline, AtfKeys k)
 {
     return(Input.KeysUtil.IsTextBoxInput(isMultiline, k));
 }
Exemplo n.º 22
0
        /// <summary>
        /// Converts a Sce.Atf.Input.Keys to a System.Windows.Input.Key</summary>
        /// <remarks>Warning: this will only return a single Key as the WPF Key
        /// structure is not flags based</remarks>
        /// <param name="atfKey">AtfKeys enum</param>
        /// <returns>Converted WpfKey enum</returns>
        public static WpfKey ToWpf(AtfKeys atfKey)
        {
            var keys = atfKey & ~AtfKeys.Modifiers;

            return(System.Windows.Input.KeyInterop.KeyFromVirtualKey((int)keys));
        }
Exemplo n.º 23
0
 /// <summary>
 /// Returns whether or not the given AtfKeys represents a human-readable character that could
 /// be inserted into a text box, for example</summary>
 /// <param name="k">AtfKeys value</param>
 /// <returns>True iff the given AtfKeys value represents a human-readable character</returns>
 public static bool IsPrintable(AtfKeys k)
 {
     return(Input.KeysUtil.IsPrintable(k));
 }
Exemplo n.º 24
0
 /// <summary>
 /// Attempts to process the key as a command shortcut</summary>
 /// <param name="key">Key to process</param>
 /// <returns>True iff the key was processed as a command shortcut</returns>
 public bool ProcessKey(Sce.Atf.Input.Keys key)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 25
0
 /// <summary>
 /// Converts a Sce.Atf.Input.Keys to a System.Windows.Input.Key</summary>
 /// <remarks>Warning: this will only return a single Key as the WPF Key 
 /// structure is not flags based</remarks>
 /// <param name="atfKey">AtfKeys enum</param>
 /// <returns>Converted WpfKey enum</returns>
 public static WpfKey ToWpf(AtfKeys atfKey)
 {
     var keys = atfKey & ~AtfKeys.Modifiers;
     return System.Windows.Input.KeyInterop.KeyFromVirtualKey((int)keys);
 }
Exemplo n.º 26
0
        /// <summary>
        /// Processes the key as a command shortcut</summary>
        /// <param name="key">Key to process</param>
        /// <returns>True iff the key was processed as a command shortcut</returns>
        public override bool ProcessKey(Keys key)
        {
            if (key == Keys.F1 && m_lastHoveringToolStrip != null)
            {
                foreach (var item in m_lastHoveringToolStrip.Items)
                {
                    var button = item as ToolStripButton;
                    if (button != null)
                    {
                        if (button.Selected)
                        {
                            foreach (KeyValuePair<CommandInfo, CommandControls> commandAndControl in m_commandControls)
                            {
                                if (commandAndControl.Value.Button == button &&
                                    !string.IsNullOrEmpty(commandAndControl.Key.HelpUrl))
                                {
                                    // There doesn't seem to be a way to prevent the WM_HELP message that gets generated
                                    //  during the call to Process.Start(). We can't add a filter to every Control's
                                    //  WndProc. So, let's use a static way of stopping WebHelp for a little bit.
                                    WebHelp.SupressHelpRequests = true;
                                    Process.Start(commandAndControl.Key.HelpUrl);

                                    if (m_webHelpTimer == null)
                                    {
                                        m_webHelpTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(1000) };
                                        m_webHelpTimer.Tick +=
                                            (o, e) =>
                                            {
                                                WebHelp.SupressHelpRequests = false;
                                                m_webHelpTimer.Stop();
                                            };
                                    }
                                    m_webHelpTimer.Start();
                                    
                                    return true;
                                }
                            }
                        }
                    }
                }
            }

            return base.ProcessKey(key);
        }
Exemplo n.º 27
0
 /// <summary>
 /// Tests if ATF key is an input key by calling Windows IsInputKey with converted argument</summary>
 /// <param name="keyData">ATF key data</param>
 /// <returns>True iff key is an input key</returns>
 protected virtual bool IsInputKey(AtfKeys keyData) { return base.IsInputKey(KeysInterop.ToWf(keyData)); }
Exemplo n.º 28
0
 /// <summary>Converts numeric pad AtfKeys to digit AtfKeys</summary>
 /// <param name="keys">AtfKeys number pad keys</param>
 /// <returns>AtfKeys digit equivalent</returns>
 public static AtfKeys NumPadToNum(AtfKeys keys)
 {
     return(Input.KeysUtil.NumPadToNum(keys));
 }
Exemplo n.º 29
0
 /// <summary>
 /// Converts a Sce.Atf.Input.Keys to a System.Windows.Forms.Keys</summary>
 /// <param name="keys">AtfKeys enum</param>
 /// <returns>Converted WfKeys enum</returns>
 public static WfKeys ToWf(AtfKeys keys)
 {
     return((WfKeys)keys);
 }
Exemplo n.º 30
0
 /// <summary>
 /// Process ATF message and command key by calling the base ProcessCmdKey with converted arguments, 
 /// which allows this key press to be consumed by owning
 /// controls like PropertyView and PropertyGridView and be seen by ControlHostService.
 /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
 /// Returning true means that this key press has been consumed by this method and this
 /// event is not passed on to any other methods or controls.</summary>
 /// <param name="msg">ATF message to process</param>
 /// <param name="keyData">ATF key data</param>
 /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
 /// True to consume this key press, so this
 /// event is not passed on to any other methods or controls.</returns>
 protected virtual bool ProcessCmdKey(ref AtfMessage msg, AtfKeys keyData) 
 {
     WfMessage wfMsg = MessageInterop.ToWf(msg);
     return base.ProcessCmdKey(ref wfMsg, KeysInterop.ToWf(keyData)); 
 }
Exemplo n.º 31
0
Arquivo: Util.cs Projeto: zparr/ATF
 /// <summary>
 /// Converts an ATF key code that invokes a command to the WPF keyboard combination used to invoke that command</summary>
 /// <param name="atfKey">ATF key code</param>
 /// <returns>WPF keyboard combination to invoke the command</returns>
 public static KeyGesture ConvertKey(Sce.Atf.Input.Keys atfKey)
 {
     return(ConvertKey(KeysInterop.ToWf(atfKey)));
 }
Exemplo n.º 32
0
 /// <summary>
 /// Reserves a shortcut key, so it is not available as a command shortcut</summary>
 /// <param name="key">Reserved key</param>
 /// <param name="reason">Reason why key is reserved, to display to user</param>
 public void ReserveKey(Sce.Atf.Input.Keys key, string reason)
 {
     throw new NotImplementedException();
 }