/// <summary> /// Generates virtual keystrokes. Like <see cref="send"/>, but without reliability features: delays, user input blocking, resetting modifiers/CapsLock. /// </summary> /// <param name="keysEtc"></param> /// <remarks> /// Ignores <b>opt.key</b> and instead uses default options with these changes: /// - SleepFinally = 0. /// - KeySpeed = 0. /// - NoBlockInput = true. /// - NoCapsOff = true. /// - NoModOff = true. /// </remarks> /// <seealso cref="more.sendKey"/> public static void sendL([ParamString(PSFormat.Keys)] params KKeysEtc[] keysEtc) { var o = new OKey() { KeySpeed = 0, NoBlockInput = true, NoCapsOff = true, NoModOff = true, SleepFinally = 0 }; new keys(o).Add(keysEtc).SendIt(); }
public void SaveKey(OKey oKey) { var existing = GetKeyById(oKey.Id); if (existing == null) { data.Keys.Add(oKey); } else { existing.Key = oKey.Key; existing.KeyType = oKey.KeyType; existing.Path = oKey.Path; data.Keys.Remove(existing); data.Keys.Add(existing); } SaveData(); }
/// <param name="cloneOptions">Options to be copied to <see cref="Options"/> of this variable. If null, uses default options.</param> /// <example> /// <code><![CDATA[ /// var k = new keys(opt.init.key); /// k.Options.KeySpeed = 50; /// k.AddKeys("Tab // Space").AddRepeat(3).AddText("text").AddKey(KKey.Enter).AddSleep(500); /// k.Send(); //sends and clears the variable /// k.Add("Tab // Space*3", "!text", KKey.Enter, 500); //the same as the above k.AddKeys... line /// for(int i = 0; i < 5; i++) k.Send(true); //does not clear the variable /// ]]></code> /// </example> public keys(OKey cloneOptions) { Options = new OKey(cloneOptions); }
public void DeletyeKey(OKey oKey) { data.Keys.Remove(oKey); SaveData(); }