コード例 #1
0
        /// <summary>
        /// Configures and enables a shortcut for a key
        /// </summary>
        public void Key_Set(SC_Type Id, ShortcutsKey key)
        {
            if (Key_Get(Id).used)
            {
                HotKeyRegister(Id, key, false);
            }

            HotKeyRegister(Id, key, true);
            sc_list.SetValue(key.ShallowCopy(), (int)Id);
        }
コード例 #2
0
        /// <summary>
        /// Get the bound key of a shortcut
        /// </summary>
        public ShortcutsKey Key_Get(SC_Type Id)
        {
            ShortcutsKey key = (ShortcutsKey)sc_list.GetValue((int)Id);

            return(key.ShallowCopy());
        }
コード例 #3
0
 /// <summary>
 /// Configures and disables a shortcut for a key
 /// </summary>
 public void Key_PreSet(SC_Type Id, ShortcutsKey key)
 {
     Key_Set(Id, key.ShallowCopy()); // configures and validate key (enable once)
     Key_SetState(Id, false);        // disable afterwards
 }