KeyBind User Commands
These are the commands which can be used inside a KeyBind Task.
Commands can be chained together (with "**") to run sequentially or better yet, placed inside .kc scripts, which are just plain text lists of commands. Commands can be paths to .kc scripts and .kc scripts can have commands which are themselves paths to other .kc scripts and so on; big fun.
There are many commands here; hopefully you should be able to accomplish most tasks. If not, let me know.
A few conventions..
Where a function has multiple values and you only want to specify one of the later values, sending "-" for the earlier values will usually get you the default value, whatever it is. For some commands this will mean "what you previously set as the default", i.e. by moving an InfoBox() to a new position.
In text you type directly, \n inserts a line break, e.g. Text(This is some text\nAnd another line here). This also works for ClipBoard text, file data, Input() prompts, box messages and other places. In Speak(), it separates spoken text. Paths (like C:\new files) are recognised and will retain their backslashes.
Parameters are usually split by pipe characters "|". Where a command includes a Task, the task will be last, so its own commands' pipes don't get confused with the current command's parameters. Oh my! Even that sentence was confusing. Each Command's sections should hopefully make everything clear.
Everything is runnable.
This page will be a lot more fun if you have KeyBind installed; click anywhere on any runnable Task to instantly select the entire Task, perfect for your RunSelected() HotKey!. Mash your KeyBind keys (Ctrl+Win+Alt; everything left of the spacebar) + R, to run the example Task directly inside KeyBind. You will see the results instantly.
Note: If you play with File*() command examples, real files will be created on your desktop!
The Commands:
Abort()
HotKey: Ctrl+Win+Alt+Pause
Abort()- Stop the current task, clear any queued commands and restart KeyBind. You can also use the Abort hotkey or the tray menu's Abort and Reload item. Set the hotkey with Config Editor → Options → Runtime & Speech → Abort HotKey.
- Unlike
Reload(),Abort()clears the run queue and command-line parameters, and resets window-trigger states. Abort()does not destroy activeCountDown()timers.- @ExitValue: Empty. KeyBind restarts.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindAbort()InfoBox(Aborting running tasks and reloading...|2)**Abort()- stop a runaway script, flash a warning, and reset KeyBind cleanly.
See also: Quit(), Reload(), Suspend()
Access()
Access()- Open the Authorized Apps panel, the same window you get to from Config Editor > Options > Server > App access.
Here you can review which apps currently hold valid KeyBind server tokens and revoke them, if you wish. Changes apply immediately.
- To enable you to refresh pages in your browser, create shortcuts and such.
- KeyBind Server itself has a permanent access token. If you revoke it, run
Options()again (or anyReport()) for a new one. - @ExitValue: True if dialog opened (most likely, yes).
- See also:
AppUsage(),Report(),Options()
Activate()
- Activate(Window[|Timeout])
- Bring a matching window to the foreground; optionally wait for it to become active.
- Window matching:
- Title substring, e.g.
Notepad++matches any title containing it. - Friendly names from title mappings previously setup in Config Editor, e.g.
Explorerfor<CLASS:CabinetWClass>. - Window class and details in angle braces - shown as
<...>in settings, used internally as[...]- e.g.<CLASS:Notepad++>or combined<TITLE:...; CLASS:...; TEXT:...>. - Position/size, e.g.
<X:...;Y:...;W:...;H:...>. - Regular expressions via
<REGEXPTITLE:...>and<REGEXPCLASS:...>, e.g.<REGEXPTITLE:(?i)(.*Edge.*|.*Chrome.*)>to match multiple windows. - See Config Editor → Options → case-sensitive titles; use the CapsLock window-info tool to grab exact titles, classes and details.
- Title substring, e.g.
- @ExitValue: Handle. The window handle, or 0 when that window is not live.
Activate(),Minimize(),Maximize(),Restore(),WindowOnTop()andSetTransparency()set KeyBind's internal last-used window. Subsequent calls to functions where Window is optional can then is the window without specifying it.- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindActivate(Explorer)- friendly name for<CLASS:CabinetWClass>.Activate(Control Panel|10s)- title substring with a 10-second wait.Activate(<CLASS:MozillaWindowClass>)- raw class catcher (Thunderbird).Activate(<REGEXPCLASS:CASCADIA.*>)- regex class catcher (Windows Terminal).Activate(<X:-6;Y:-6;W:1378;H:780>)- position/size catcher (maximized laptop screen).Activate(<REGEXPTITLE:(?i)(.*Edge.*|.*- Google Chrome|.*Mozilla Firefox.*|.*- Brave.*)>)- match any of several browsers.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Started at @Time)- opens Notepad, waits for it, then types a timestamp.IfRunning(chrome.exe)**Activate(<REGEXPTITLE:(?i).*Google Chrome.*>|3s)**Else()**Launch(chrome.exe)**Wait(Google Chrome|5s)**EndIf()**SendWait(^l)- switch to Google Chrome if open, or launch and focus the address bar.
See also: CloseWindow(), Dimensions(), GetWindow(),
KillWindow(), Launch(), Maximize(), Minimize(),
Restore(), Wait(), WindowOnTop(),
WinMove()
AppUsage()
- AppUsage([app name])
- Opens the App Usage report in your default browser. Run
AppUsage(program name / path)to open the page with that app's filter applied, save a little typing - Enable Options > General > App usage (
usage_monitor=on) to monitor all your system's app's foreground time. - Your app usage reports are stored in
@DataDir\Server\AppUsage\AppUsage.YYYY-MM.jseach file storing a month's worth of data. Server\KeyBind.csscontains all report styling, colors, fonts, spacing, etc.. KeyBind creates it only if it is absent, so you can edit this file to customize your reports however you like.- When the KeyBind server is disabled the local file opens directly (App Usage reports don't need the server and will work fine in your browser).
- The App Usage report page is fairly self-explanatory, most thinks are clickable, columns sortable, and so on
Usage()is an alias ofAppUsage().- @ExitValue: The HTML report path on success; false if data loading, stylesheet extraction, HTML generation or browser launch fails.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindAppUsage()- generates and opens the report for all recorded applications.AppUsage(notepad++)- starts with the report filtered to Notepad++.AppUsage(C:\Program Files\VideoLAN\VLC\vlc.exe)- filters by executable path to distinguish this copy from one installed elsewhere.Usage(vlc)- uses the alias to show recorded VLC usage.
See also: ListView(), OpenDataDir(), Report(), Usage()
Assign()
Alias of VarAssign()
Beep()
- Beep(frequency[|dur|vol|wave|pan|adsr|phase|duty])
- Play a generated tone.
- Keys and their parameters:
frequency= Hz, the first (and only required) parameter; a number from 37 to 32767 (you probably won't hear anything above 15k, unless you are very young!).dur= Length of tone: a number followed optionally bymsors; (from 10ms to 10s). Default is 1000ms (1 second). A bare value after the frequency is always interpreted asdur, a bare unit asms.vol= Volume, 0 to 100. Default: 100.wave= Wave type. sine, triangle, square. Default: sine.pan= Left to right position, -100 is full left, 100 is full right, 0 is centre. Default: 0.adsr= Loudness shape in four parts: Attack (ms), Decay (ms), Sustain (percent), Release (ms). Defaults: 5,0,100,5.phase= Where the wave starts, in degrees, 0 to 360. Default: 0.duty= Duty cycle, in percent. Default: 50. For square waves, 1 to 99 sets the portion of each cycle that is high. For triangle waves, 0 to 100 sets the portion spent rising: 50 gives equal rise and fall times, 0 gives a descending sawtooth, and 100 gives an ascending sawtooth.frequency,dur,vol,adsranddutyaccept digits with or without decimal fractions (e.g.10.67); pan and phase also accept a leading minus sign, e.g. -5.- Setting a
frequencyoutside the limit gets you 500 Hz; aduroutside the limit gets you 1000 ms.volcaps at 100, pan at -100..100 and duty at 0..100 for triangle or 1..99 for square. Phase wraps to 0-359.999 degrees; sustain caps at 100. - Malformed values, unknown keys and unsupported waveforms are rejected before playback. Keys and values are case-insensitive.
- @ExitValue: Handle. A handle to the playing tone.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindBeep(880)**MessageBox(Heard it|One plain 880 Hz tone.)- plays the tone, then confirms.Beep(880|150)- a short (150ms) sine wave tone.Beep(880|150|wave=square|duty=25)- a short (150ms) thin square tone.Beep(330|800ms|wave=sine|vol=35|adsr=20,0,100,80)- sine wave, pure and smoothBeep(330|800ms|wave=square|duty=50|vol=35|adsr=20,0,100,80|dur=1500)- 1.5s square wave.Beep(330|800ms|wave=triangle|duty=100|vol=35|adsr=20,0,100,80)- Sawtooth. Bzzz!Beep(660|200ms|wave=triangle|duty=100)**Pause(150ms)**Beep(520|200ms|wave=triangle|duty=100)- a harsh two-tone alert.Beep(880|dur=400ms|wave=sine|adsr=30,50,70,200)- a soft chime that swells and fades.Beep(880|150ms)**Pause(100ms)**Beep(1320|250ms)- plays a simple two-note success sound.Confirm(Which tone?|Yes plays the high success tone, No plays the low failure tone.)**If(@ExitValue|Yes)**Beep(1400|200ms)**Else()**Beep(220|600ms)**EndIf()- picks the success or failure tone by answering the question.- How about some R2D2 impersonations!
Beep(2100|25|wave=square|duty=15|vol=25)**Beep(1300|30|wave=square|duty=12|vol=28)**Beep(2200|25|wave=square|duty=15|vol=25)**Beep(900|40|wave=triangle|duty=100|vol=22)**Beep(500|70|wave=triangle|vol=30)Beep(1100|65ms|wave=square|duty=15|vol=32|adsr=5,0,100,20)**Beep(1650|55ms|wave=square|duty=20|vol=30|adsr=5,0,100,20)**Beep(1250|75ms|wave=square|duty=12|vol=34|adsr=5,0,100,25)**Pause(35ms)**Beep(1900|60ms|wave=square|duty=15|vol=27|adsr=5,0,100,20)**Beep(850|110ms|wave=triangle|vol=38|adsr=10,15,80,45)**Beep(1450|70ms|wave=square|duty=20|vol=30|adsr=5,0,100,30)
See also: Chord(), PlaySound(), Silence(),
StopAudio()
CDTrayClose()
- CDTrayClose([Drive Letter])
- Close an optical drive tray.
- @ExitValue: Text. The drive state, or an error message.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCDTrayClose()- closes the default optical drive.CDTrayClose(D:)- closes drive D explicitly.
See also: CDTrayOpen(), OpticalTrayClose(), OpticalTrayOpen()
CDTrayOpen()
- CDTrayOpen([Drive Letter])
- Open an optical drive tray.
- @ExitValue: Text. The drive state, or an error message.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCDTrayOpen()- opens the default optical drive.CDTrayOpen(D:)- opens drive D explicitly.
See also: CDTrayClose(), OpticalTrayClose(), OpticalTrayOpen()
ChangeCase()
- ChangeCase(Mode|Target)
- Change the case of some text:
upper(oruppercase),lower(orlowercase),titleorsentence(the keywords thmselves are case-insensitive, "LoWERcAse" also works!). Targetis the text you want to transform: Use@Selectedto convert the currently selected text (or the word at the caret position), KeyBind pastes the result in-place,@ClipBoardrewrites the ClipBoard, and@UserVariablethat variable, both operations performed in-place, for later use.- You can also send plain text to this function, e.g.
ChangeCase(sentence|MY mEeSSed UP TeXt); now @ExitValue contains "My meessed up text". Hey, I didn't say it would fix your typos! - @ExitValue: the converted text.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindChangeCase(title|@Selected)- title-cases the highlighted text in place.ChangeCase(upper|@ClipBoard)**Paste()- uppercases the clipboard, then pastes it.ChangeCase(sentence|my notes)**MessageBox(@ExitValue)- shows the converted text.
See also: ClearSlots(), Copy(), CopyAppend(),
Cut(), CutAppend(), DeDupeLines(),
FindReplace(), Num2Words(), Paste(),
PastePlainText(), PasteSlot(), SortLines(),
Text(), VarAssign(), WordCount()
ChoiceBox()
- ChoiceBox(Title|Message|Option[|Option...])
- Ask the user to pick one of several options. You can use
\nto create line breaks in your message.; leave the message empty for buttons-only style. - @ExitValue: the text of the picked option; empty when the dialog is dismissed.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindChoiceBox(Favourite colour?|Pick a colour:|Red|Green|Blue)**MessageBox(You picked @ExitValue)
See also: If(), InfoBox(), Input(),
MessageBox(), Variable Commands
Chord()
- Chord(Note[;Note...])
- Play two or more generated tones together, starting on the same time (in the same 16 bit stereo buffer, so they cannot drift apart).
- Each note takes the same parameters as
Beep()(frequency first, thendur|vol|wave|pan|adsr|phase|duty), separated by semicolons. Up to 8 notes. The chord lasts as long as its longest note. Loudness is averaged across notes, so a chord at full volume sounds about as loud as oneBeep()at the same volume (each note's volume is set at the start of the tone, so a note will not get louder because other notes in the chord have finished). - Separate individual notes with semicolons.
- Every note is checked before anything plays, so one badly-configured note kills the
Chord()and you get silence (rather than half the chord). - @ExitValue: Handle. A handle to the playing chord.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindChord(155.56|1000ms|wave=sine;185|1000ms|wave=square;233.08|1000ms|wave=triangle|duty=100)- an Eb minor triad, each note its own type of wave.Chord(440|1000ms;554.37|1000ms;659.25|1000ms)- an A major triad, simple sine waves.
See also: Beep(), Silence(), StopAudio()
ClearSlots()
- ClearSlots([Slot])
- Delete one clipboard slot, or wipe every slot, leaving only the original entry in the clipboard.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCopy(Slot demo - first clipping)**Copy(Slot demo - second clipping)**ClearSlots()**MessageBox(Slots cleared|@ExitValue - rows gone, base entry back in the clipboard.)- fills two slots, wipes the rows and shows the result.Copy(Keep me)**ClearSlots(3)**MessageBox(Slot 3 dropped|Clipboard rebuilt from the surviving rows.)- drops one numbered row and rebuilds the pile from what survived.
See also: ChangeCase(), Copy(), CopyAppend(),
Cut(), CutAppend(), DeDupeLines(),
FindReplace(), Num2Words(), Paste(),
PastePlainText(), PasteSlot(), SortLines(),
WordCount()
Click()
Alias of MouseClick()
ClickDrag()
- ClickDrag(Start X|Start Y|End X|End Y[|right/left/middle/main/menu/primary/secondary|Mouse Speed|Coordinate Mode])
- Drag an item from one position to another.
- Coordinates use screen positions by default. Use
relativeto measure both points from the current pointer position, orwindowto measure both from the foreground window's top-left corner. - Use literal
xoryfor either starting coordinate to use the pointer's current X or Y position, even when usingrelativeorwindow. - As usual, use
-for any skipped parameter to keep their defaults, whatever you set in KeyBind's config. - @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindClickDrag(100|200|500|200|left|10)- drags an item horizontally across the screen.ClickDrag(x|y|500|200)- drags from the current pointer position to screen position 500, 200.ClickDrag(0|0|300|0|left|10|relative)- drags 300 pixels right from the current pointer position.ClickDrag(100|50|400|50|left|10|window)- drags horizontally within the foreground window.ClickDrag(0|0|300|0|-|-|relative)- uses the default button and speed while dragging 300 pixels right.
See also: MouseClick(), MouseDown(), MouseMove(),
MouseUp()
ClipBoardSlots()
ClipBoardSlots()- Show the ClipBoard slots viewer, which displays the
CopyAppend()&CutAppend()pile, one row per slot. - Multiline previews show their line count; pasted text retains its original line breaks.
- Ctrl-click and Shift-click to select several rows to paste or delete together.
- The ClipBoardSlots viewer stays open while KeyBind keeps running, new slots appear live
- Paste operations target your active window.
- @ExitValue: True on success, false when there is nothing to show.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindClipBoardSlots()- opens the slots viewer.
See also: ClearSlots(), CopyAppend(), CutAppend(), PasteSlot()
CloseWindow()
- CloseWindow(Window)
- Ask a matching window to close normally.
- See window matching in
Activate(). - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**MessageBox(Closing Notepad|KeyBind opened this to show CloseWindow() working.)**CloseWindow(Untitled - Notepad)- opens Notepad politely, then asks it to close.Launch(calc.exe)**Wait(Calculator|5s)**CloseWindow(Calculator)- opens Calculator, then asks it to close normally.
See also: Activate(), Dimensions(), GetWindow(),
KillWindow(), Maximize(), Minimize(),
Restore(), WindowOnTop(), WinMove()
ColorReport()
- ColorReport(on/off/toggle)
- Enable or disable creation of a full colour report when sampling a colour.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindColorReport(on)**Mag()**MessageBox(Colour picked|@ClipBoard)- picks a colour with the full report, then shows the clipboard value.ColorReport(off)**Mag()**MessageBox(Minimal report|@ClipBoard)**ColorReport(on)- tries the picker with minimal reporting, shows the value, then restores full reporting.
See also: CopyColor(), Mag(), SwitchColorFormat()
ConfigEditor()
HotKey: Ctrl+Win+Alt+X
ConfigEditor()- Open KeyBind's Config Editor.
- Like the other commands which have a menu item in KeyBind's system tray, if you have a global HotKey for this, that hotkey will appear in KeyBind's tray menu item for that function (if you edit your HotKey, the tray menu will automatically update to your new HotKey).
- @ExitValue: Empty. The editor opens. Isn't that enough?
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfigEditor()
See also: EditIniFile(), KeyBind()
Confirm()
- Confirm([Title[|Message]])
- Presents a simple Yes/No/Cancel dialog.
- You can optionally supply a title and message text. Title, if not supplied, defaults to
Confirm - The default message is
Are you sure?. You can also leave this blank, for a buttons-only dialog. See the examples below. - Yes, you could technically do this with a
ChoiceBox(), but this is quicker, for times when simple is all you need. - @ExitValue: the text of the picked button (
Yes,No, orCancel); if the dialog is dismissed, @ExitValue is empty. - Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Continue?|Run the backup now?)**If(@ExitValue|Yes)**MessageBox(Backing up...)**EndIf()- continues only on Yes.Confirm(|Run the backup now?)**If(@ExitValue|Yes)**MessageBox(Backing up...)**EndIf()- same, but only message supplied.Confirm(Run the Backup?|)**If(@ExitValue|Yes)**MessageBox(Backing up...)**EndIf()- same, but only message intentionally blank.Confirm()**MessageBox(You answered @ExitValue)- bare example.
See also: ChoiceBox(), If(), MessageBox()
Copy()
- Copy([Text])
- Copy the current selection, or place supplied text directly on the clipboard.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCopy(KeyBind is ready)**Paste()- puts supplied text on the clipboard and pastes it.
See also: ChangeCase(), ClearSlots(), CopyAppend(),
Cut(), CutAppend(), DeDupeLines(),
FindReplace(), Num2Words(), Paste(),
PastePlainText(), PasteSlot(), SortLines(),
WordCount()
CopyAppend()
HotKey: Ctrl+Shift+C (sample HotKeys)
CopyAppend()- Copy the current selection and append it to the existing clipboard contents.
CopyAppend(), likeCutAppend()will add a "slot" to your ClipBoard. You can interact with these slots using theClipBoardSlots()command (Ctrl+Win+Alt+P).You don't need to interact with your stacked clipboard items this way, and they will paste out exactly as expected,
ClipBoardSlots()simply provides a handy way to get at them, reorder slots, paste slots into your app, that sort of thing.- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Collect me)**SelectWord()**CopyAppend()**FileAppendData(@Desktop\research.txt|@ClipBoard\n)**MessageBox(Collected|Selection joined the collection - see research.txt on your desktop.)- collects the selection and files the growing result.CopyAppend()**FileAppendData(@Desktop\research.txt|@ClipBoard\n)- adds the selection to the clipboard collection and saves the growing result.
See also: ChangeCase(), ClearSlots(), Copy(),
Cut(), CutAppend(), DeDupeLines(),
FindReplace(), Num2Words(), Paste(),
PastePlainText(), PasteSlot(), SortLines(),
WordCount()
CopyColor()
HotKey: Ctrl+Win+Alt+C
- CopyColor(on/off/toggle)
- Enable or disable automatic copying of sampled colours to the clipboard.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCopyColor(on)**Mag()**Paste()- picks a colour, copies its value and pastes it into the active app.CopyColor(on)**Mag()**FileWriteData(@Desktop\colour.txt|@ClipBoard\n)**MessageBox(Saved|Colour @ClipBoard written to colour.txt on your desktop.)- picks a colour and keeps it in a desktop file.
See also: ColorReport(), Mag(), SwitchColorFormat()
Count()
- Count(Number)
- Change the number shown by
@Count. It starts at 1 each time KeyBind launches. - @ExitValue: Number. The running count.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCount(+1)**MessageBox(Counter|Count is now @ExitValue.)- adds one and shows the new count.Count(+1)**FileWriteData(@Desktop\count-@Count.txt|Count reached @Count at @Time on @Date.\n)**MessageBox(File written|Created count-@Count.txt on your desktop.)- increments the counter and writes the next numbered file to your desktop.Input(Set Counter|Enter a number|wanted)**Count(@wanted)**MessageBox(Counter set|Count is now @ExitValue.)- asks for a number, sets the counter and shows it.
See also: FileReadData(), FileWriteData()
CountDown()
- CountDown([1h 12m 3s][|task])
- Opens a simple countdown timer sporting a large digit readout (which also acts as a start/stop/pause/resume button and is draggable) with controls for hours, minutes and seconds.
- Move the mouse away from the CountDown timer and it shrinks down to a pill-like digit-only readout (corner radius is configurable).
- Supply a duration in your command and your CountDown timer begins immmediately.
- Closing a timer destroys the timer completely.
- Edit your countdown timer defaults in the config editor, basically the start and stop sounds, as well as the default task to run when a countdown completes. This can be anything you can put in a KeyBind Task. You can also drop WAV/MP3 files into the task input and use those for your completion sound (KeyBind simply wraps your dropped file path in a
PlaySound()command). - A CountDown timer without a Task will flash your configured Warning Color on completion (set this in your color prefs).
- You can specify a completion Task for any CountDown timer by include a pipe "
|" in your command. Everything after the pipe is considered a Task, which may itself contain pipes. This also enables you to specify no task for a particular CountDown timer, rather than use the default task, if set, e.g.CountDown(2m|)finishes by simply flashing the warning color, no matter what your default CountDown Task is. - A minimized CountDown timer without a task will restore itself on completion, so you can see the flashing.
- Each CountDown timer remembers its own position, using its duration to create a unique key in your ini (preference) file, e.g. "
countdown_2m_3s_x=2352". Settings update live as you drag the timer around your desktop. CountDown timers with no duration set use your default CountDown timer position, which again, will be remembered if you move it around. - Right-click the digit readout for a menu with a few live options; reset, opt-out of the set Task, minimise, close.
- You can also minimize a CountDown timer by double-clicking the title-bar. Minimized CountDown timers are available from KeyBind's tray menu, with their current remaining time refreshed when you open the menu.
- CountDown timers survive restart (System or just KeyBind). On launch, KeyBind will reload all active CountDown timers and they will pick-up where they left off, running or paused, visible or minimized.
Note: If a reloading timer completes *just* as KeyBind is loading, KeyBind will action the Task (or show-and-flash) as soon as it is finished loading itself, which may be a couple seconds later.
Also note: this state is saved on exit. SO if, for example, you kill KeyBind from the task manager, the CountDown restore data will not be written and you will lose those timers (unless you already restarted KeyBind cleanly while that CountDown timer was running).
- @ExitValue: Handle. The countdown window handle on successful creation (which you can later use/save/etc.); false if a timer window cannot be created.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCountDown()- opens the countdown dialog waiting for input.CountDown(2m 3s|)- Start a CountDown timer with NO Task, overriding the default task so it stays open and flashing when complete.CountDown(1h 12m 3s)- opens the countdown already running with one hour, twelve minutes and three seconds.CountDown(2m)- a two-minute countdown, ideal for brewing tea and Mokka pot coffee. I have this one on a HotKey.CountDown(2m 10s|Beep(880|100))- runs that beep instead of the default completion task.CountDown(2m|Beep(880|100)**Text(Tea is ready!))- runs an entire task chain when the timer finishes.CountDown(|Beep(880|100))- opens a stopped timer with its own completion task; you will need to choose a duration.CountDown(15s|MessageBox(Countdown complete|This timer survived Reload.))**Reload()- starts a 10-second timer, reloads KeyBind immediately and shows the message when the original countdown finishes.CountDown(45s|)**CountDown(90s|)**Reload()- starts two independent timers, reloads and restores both. Each stays open flashing when it finishes; neither runs a completion task.CountDown(2m 2s|)**VarAssign(TeaTimer|@ExitValue)**Sleep(1m 52s)**WindowMove(@WorkAreaRight-208|@WorkAreaBottom-105|-|-|@TeaTimer)- grab the CountDown timer's window handle (its @ExitValue) for later use.
See also: Beep(), PlaySound()
CreateStartupTask()
CreateStartupTask()- Have Windows start KeyBind for you at logon, after a 25-second delay and with the highest privileges available.
- This is basically an internal function which is also exposed for your use (you can do this from the config editor).
- @ExitValue: Boolean. True when creation succeeds; False on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCreateStartupTask()**MessageBox(Done|KeyBind starts 25 seconds after logon with highest privileges.)- creates the logon task and states what changed.CreateStartupTask()**MessageBox(KeyBind will start automatically next time you log on.)- creates the task and confirms what changed.
Cut()
Cut()- Cut the current selection to the clipboard. Just like Ctrl+X.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Move me with Cut)**SelectWord()**SelectWord()**Cut()**MessageBox(Cut|Clipboard holds what was removed - paste it anywhere.)**Paste()- types a line, cuts it and pastes it back.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Move me to the second window)**SelectWord()**Cut()**Activate(Notepad++)**Paste()- moves selected text into an open Notepad++ document.
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), CutAppend(), DeDupeLines(),
FindReplace(), Num2Words(), Paste(),
PastePlainText(), PasteSlot(), SortLines(),
WordCount()
CutAppend()
HotKey: Ctrl+Shift+X (sample HotKeys)
CutAppend()- Cut the current selection and append it to the existing clipboard contents.
CutAppend(), likeCopyAppend()will add a "slot" to your ClipBoard. SeeCopyAppend()for more details about ClipBoard slots.- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Clip me)**SelectWord()**CutAppend()**FileWriteData(@Desktop\clippings.txt|@ClipBoard)**MessageBox(Clipped|Removed, collected and saved to clippings.txt on your desktop.)- removes the selection, collects it and saves the collection.CutAppend()**FileWriteData(@Desktop\clippings.txt|@ClipBoard)- removes the selection, adds it to the clipboard collection and saves the collection.
See also:
ChangeCase(),
ClearSlots(),
ClipBoardSlots(),
Copy(),
CopyAppend(),
Cut(),
DeDupeLines(),
FindReplace(),
Num2Words(),
Paste(),
PastePlainText(),
PasteSlot(),
SortLines(),
WordCount()
Date()
HotKey: Ctrl+Alt+A (sample HotKeys)
Date()- Type today's date wherever the caret is, using your chosen date format.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Report created: )**Date()**MessageBox(Stamped|Today's date typed into Notepad using your date format.)- types a labelled date into a fresh note.
DeDupeLines()
- DeDupeLines([
source text]) - Removes duplicate lines, keeping the first-seen line only.
- The
source textcan be:@Selected,@ClipBoard(the default source when none is specified), or a@UserVariablecontaining some text. - @ExitValue: the de-duped text.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCopy(cherry\napple\ncherry\nbanana)**DeDupeLines()**ListView(@ExitValue|Deduped) - extra cherry not required!Copy(cherry\napple\ncherry\nbanana)**DeDupeLines()**SortLines(@ExitValue)**ListView(@ExitValue|Sorted + DeDuped Lines)- and now it's SORTED.Note use of @ExitValue; these functions do not perform an in-place replacement.
Your ClipBoard still reads:cherry apple cherry banana
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), Cut(), CutAppend(),
FindReplace(), Num2Words(), Paste(),
PastePlainText(), PasteSlot(), SortLines(),
WordCount()
Define()
- Define([Target|URL|Start|End|Variable])
- Looks up a word or phrase using your configured website, then speaks or saves the extracted definition.
Targetcan be literal text, @Selected, @ClipBoard, or a user variable such as @lookup_word. Other text expands @Macros. An existing user variable can also be named without the leading@; an existing variable name takes precedence over literal text.URLis the lookup URL (put your @LookUp macro where the word goes in the search query) and must contain the literal @LookUp macro. KeyBind switches @LookUp for your lookup word/phrase.Startcontrols where to start reading, use any unique string (or first instance of some string) immediately preceding the text you want KeyBind find.Endcontrols the trim point. Usually this can be left blank as KeyBind will stop when it hits the next HTML tag, but you may want to cut the definition sooner, for sites that mix blurb with content.- If
Variableis set, speaking the defenition is diabled and the definition is stored in the specified user variable, which you can use later, save, and so on. - You can supply later fields, leaving earlier fileds empty or use
-. - If target is set to @Selected, then
Define()behaves just likeDefineSelected(). Startidentifies a unique HTML element above the definition. KeyBind locates the element then reads the first plain text ite finds after that, reading until it hits an HTML tag. It starts after that element's opening tag, skips leading nested opening tags and whitespace, and reads through to the matching closing tag. Embedded HTML tags are removed and HTML entities are decoded.- There's a button in the Config Editor which makes this fairly easy, you simply select the text you'd expact back and let KeyBind work it out.
Endoptinally sets an end point to read to. Usually you will not need this. Note: Start and End values also expand @Macros.Variable, when supplied, must be valid; reserved macro names are rejected. If valid, the definition is saved in that variable instead of being spoken. Omit this field entirely to speak the definition using your default voice.- @ExitValue: Boolean. True when whichever output you selected (speech or variable assignment) succeeds; false if anything goes wrong.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBind
Define(serendipity)- looks up the literal word and speaks the definition.Copy(serendipity)**Define(@ClipBoard)- puts the word on the clipboard, then looks up the clipboard text and speaks the definition.VarAssign(lookup_word|serendipity)**Define(@lookup_word|-|-|-|word_def)**If(@ExitValue)**MessageBox(Definition|@word_def)**EndIf()- reads a user variable, stores the definition without speaking, and displays it only if the lookup succeeds.Define(serendipity|-|-|-|word_def)**If(@ExitValue)**FileAppendData(@Desktop\definitions.txt|serendipity: @word_def\n)**MessageBox(Definition|@word_def)**Else()**MessageBox(Lookup failed|No definition was returned.)**EndIf()- appends a successful definition and a line break to definitions.txt on your desktop, creating the file if necessary; a failed lookup displays the failure message instead.
See also: ConfigEditor(), Copy(), DefineSelected(),
FileAppendData(), HttpGET(), If(),
MessageBox(), Speak(), SpeakSelected(),
VarAssign(), WebSearchSelected()
DefineSelected()
HotKey: Ctrl+Win+Alt+D
- DefineSelected([URL|Start|End|Variable])
- Look up the selected word or words and read the definition aloud, using your preferred website.
Very like
Define(), exceptDefineSelected()works with only your currently selected text.You can set all the defaults in the Config Editor.
- KeyBind looks up the word at the caret position, in most apps, anyway. Some apps, like Chrome, resist and require you to make the selection first, but it mostly works well. If you already have a word or words selected, that selection is sent.
- See
Define()(above) for more details about what the parameters do. - @ExitValue: Text. The definition found, or False.
- Examples:
- There are no examples for
DefineSelected()as it only works on whatever text you have selected!
- There are no examples for
See also: Define(), HttpGET(), HttpPOST(), SelectWord(),
SpeakSelected(), Variable Commands, WebSearchSelected()
Delete()
- Delete(File Or Folder[|true])
- Delete a file or folder permanently, bypassing the Recycle Bin.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\KeyBind-demo-delete-me.txt|KeyBind created this file to show Delete() working.\n)**MessageBox(Created|See KeyBind-demo-delete-me.txt on your desktop - deleting now.)**Delete(@Desktop\KeyBind-demo-delete-me.txt)**MessageBox(Deleted|Gone - it bypassed the Recycle Bin.)- creates a demo file, then deletes it permanently.FolderCreate(@Desktop\KeyBind-demo-empty-folder)**MessageBox(Created|Empty folder on your desktop - removing now.)**Delete(@Desktop\KeyBind-demo-empty-folder)**MessageBox(Deleted|Empty folder removed.)- creates an empty folder, then deletes it.FolderCreate(@Desktop\KeyBind-demo-full-folder)**FileWriteData(@Desktop\KeyBind-demo-full-folder\inside.txt|contents\n)**Delete(@Desktop\KeyBind-demo-full-folder|true)**MessageBox(Deleted|Folder and everything inside it is gone.)- creates a folder with contents, then deletes the lot.FileWriteData(@Desktop\report-final.txt|final version\n)**FileWriteData(@Desktop\report.tmp|draft\n)**FileMove(@Desktop\report-final.txt|@Desktop\report-archived.txt|true)**If(@ExitValue)**Delete(@Desktop\report.tmp)**MessageBox(Archived|Move succeeded - the draft is deleted, the archive is on your desktop.)- archives a file, then removes its draft only if the move succeeded.
See also: EmptyRecycleBin(), Recycle()
Dimensions()
HotKey: Ctrl+Win+Alt+0
- Dimensions([oneshot/on/off/toggle])
- Throws up a wee tooltip on the top-left of a window with a readout of its size and position. In one-shot mode it follows the window under your mouse; in persistent mode it follows the active window.
Dimensions()andDimensions(oneshot)wait for one click, copy the dimensions to the ClipBoard and close the picker.Dimensions(on)keeps the picker running and immediately continues later commands. Its tooltip follows the active window. The first left click replaces the clipboard with the clicked window's title and dimensions and starts a fresh collection. Each subsequent click adds a new ClipBoard slot and rebuilds the clipboard pile, subject to the configured maximum slot count.Dimensions(off)stops the picker.Dimensions(toggle)switches it on or off. RepeatedDimensions(on)keeps the existing picker. These modes are not saved across KeyBind restarts. Opening MagPicker stops the dimensions picker.- Alt-Tab to switch apps while it's running. In persistent mode, subsequent left clicks create separate slots, including repeated clicks on the same window. Each capture contains the window title, when available, its X/Y position, width and height in pixels, and a numeric tuple in that order. The first capture replaces any previous clipboard pile and slots; reaching the maximum slot count removes the oldest entries.
- Bind
Dimensions(toggle)to a HotKey to start and stop persistent capture with the same key. RunningDimensions(oneshot)while persistent capture is active switches to a single capture: the next click copies the dimensions to the ClipBoard and closes the picker, without adding a slot. Stopping the picker leaves previously captured slots available. - @ExitValue: True when the picker starts/stops successfully or the one-shot copy succeeds; False for an invalid mode, unavailable mouse hook or active MagPicker.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindDimensions()- capture one window to the ClipBoard.Dimensions(oneshot)- explicitly select the single-click mode.Dimensions(on)- start a fresh clipboard collection with the first click, then add a new slot per click.Dimensions(off)- stop capturing.Dimensions(toggle)- switch persistent capture on or off.Dimensions(off)**ClipBoardSlots()- stop capturing and open the ClipBoard slots viewer to inspect or paste the collected reports.Dimensions(off)**PasteSlot(1-3)- stop capturing and paste slots 1 to 3 into the active input, joined together. Use this after collecting at least three slots; the numbers refer to the current collection; older entries may have been removed at the slot limit.Dimensions()**FileAppendData(@Desktop\window-sizes.txt|@ClipBoard\n)- captures a window's geometry from the clipboard into a reusable notes file.
See also: ClipBoardSlots(), PasteSlot(), SnapWin(), WinMove()
DoubleClick()
DoubleClick()- Double-click at the current mouse position.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindDoubleClick()MouseMove(@DesktopWidth/2|@DesktopHeight/2)**DoubleClick()- moves to the centre of the desktop and double-clicks.
See also: ClickDrag(), MouseClick()
Download()
- Download(URL[|Filename])
- Download a web address to a file.
- The destination can contain
@Macrosor a KeyBind user variables. If destination is omitted, you get a regular file save dialog. - For scripters: on success, the downloaded byte count is available as
@ExitValue. - @ExitValue: Number. How many bytes came down.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindDownload(https://example.com|@Desktop\example.html)**VarAssign(download_bytes|@ExitValue)**FileReadData(@Desktop\example.html|page)**MessageBox(First bytes|@download_bytes bytes - see example.html on your desktop.)- downloads to your desktop and reports the byte count.FileWriteData(@Desktop\example.html|old contents\n)**Download(https://example.com|@Desktop\example.html)**MessageBox(Refreshed|@ExitValue bytes replaced the old file.)- re-downloads over the old desktop copy.Download(https://example.com|@Desktop\example.html)Download(https://example.com|@Desktop\example.html)**MessageBox(Download complete|Downloaded @ExitValue bytes)- uses the returned byte count in a confirmation.
See also: FileReadData(), HttpGET(), HttpPOST(), Url()
EditIniFile()
HotKey: Ctrl+Win+Alt+I
EditIniFile()- Open KeyBind's settings file in the configured text editor.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindEditIniFile()
See also: ConfigEditor(), KeyBind()
Else()
Else()- Start the alternative branch of the nearest
If()orIfNot()block. It runs when that condition did not match. - @ExitValue: Unchanged. Still the previous command's value.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindIf(@ExitValue)**Speak(Succeeded)**Else()**Speak(Failed)**EndIf()- says "Failed" when the condition did not match.- It's easier to read inside a
.kc script:
FileWriteData(@Desktop\message.txt|Hello from your desktop!\n) FileReadData(@Desktop\message.txt|message) If(@message) Beep(1047|150ms) Speak(@message) Else() Beep(262|100ms) Speak(No message today) EndIf()
See also: EndIf(), If(), IfNot()
EmptyRecycleBin()
- EmptyRecycleBin([Drive Letter])
- Empty the Recycle Bin everywhere or on one drive.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Empty every Recycle Bin?|Everything in every Recycle Bin is deleted for good.)**If(@ExitValue|Yes)**EmptyRecycleBin()**MessageBox(Emptied|Every Recycle Bin is empty.)**EndIf()- asks first, then empties every Recycle Bin.Confirm(Empty the C: Recycle Bin?|Everything in the C: Recycle Bin is deleted for good.)**If(@ExitValue|Yes)**EmptyRecycleBin(C:)**MessageBox(Emptied|The C: Recycle Bin is empty.)**EndIf()- asks first, then empties only the C: bin.
EndIf()
EndIf()- End the nearest
If()orIfNot()block. Commands after it run whichever branch was taken. - @ExitValue: Unchanged. Still the previous command's value.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindIf(@ExitValue)**Beep(1200|200ms)**EndIf()**Speak(Finished)- always says "Finished".
See also: Else(), If(), IfNot()
Execute()
- Execute(Script)
- Run an AutoIt script file.
- @ExitValue: Number. The new process ID.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\hello-from-KeyBind.au3|MsgBox(64, "Hello", "KeyBind ran this AutoIt script!"))**Execute(@Desktop\hello-from-KeyBind.au3)- writes a tiny AutoIt script to your desktop and runs it.
See also: ExecuteSelected(), Launch(), RunSelected()
ExecuteSelected()
HotKey: Ctrl+Win+Alt+E
ExecuteSelected()- Run the text currently selected in the active app as AutoIt code.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(MsgBox(64, "Try me", "Select this line, then press Ctrl+Win+Alt+E"))- opens Notepad and types a runnable line; select it and run ExecuteSelected with its HotKey.
See also: Execute(), RunSelected()
FileAppendData()
- FileAppendData(Destination|Text)
- Append text to a file. A path supplied as Text is written literally. To append another file's contents, read it into a user variable with
FileReadData()and supply that variable as Text. - @ExitValue: Number. 1 on a successful append, 0 on failure; this is a status, not a byte count.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\daily.txt|Morning\n)**FileAppendData(@Desktop\daily.txt|Task completed\n)**FileReadData(@Desktop\daily.txt|day)**MessageBox(Appended|daily.txt now reads:\n@day)- appends to a desktop file, then shows the whole file.FileAppendData(@Desktop\daily.log|Completed at @Time\n)- appends a timestamped log entry.Input(Add a note|What happened?|note)**FileAppendData(@Desktop\notes.txt|@note\n)- asks for a note and adds it to a file.
See also: FileReadData(), FileWriteData()
FileCopy()
- FileCopy(Source|Destination[|1/true/9])
- Copy a file to another location.
- For scripters: use 9 instead of 1 when the destination folders might not exist yet; it replaces existing files and creates any missing parent folders.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\notes.txt|Meeting notes - @Date\n)**FileCopy(@Desktop\notes.txt|@Desktop\notes-backup.txt)**MessageBox(Copied|See notes-backup.txt on your desktop.)- writes a notes file, backs it up and confirms.FileWriteData(@Desktop\notes.txt|Meeting notes - @Date\n)**FileCopy(@Desktop\notes.txt|@Desktop\notes-backup.txt|true)**MessageBox(Backed up|notes-backup.txt overwritten on your desktop.)- same, replacing any older backup.
See also: FileMove(), FolderCopy()
FileCreate()
- FileCreate(File[|true/Mode])
- Create a new empty file.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileCreate(@Desktop\ready.flag)**MessageBox(Created|See ready.flag on your desktop.)- creates an empty flag file and confirms.FileCreate(@Desktop\ready.flag|true)**MessageBox(Created|ready.flag replaced on your desktop.)- replaces the file when it already exists.FileCreate(@Desktop\ready.flag)**If(@Desktop\ready.flag)**Beep(1200|150ms)**MessageBox(Confirmed|The flag file exists - hear the beep.)- creates a flag file and confirms that it exists.
See also: FileWriteData(), FolderCreate()
FileLineCount()
- FileLineCount(File[|Variable])
- Count the line breaks in a file, ready for the next step in your task. A file with no breaks gives 0. With a variable name, the total is also kept in
@Variablefor later steps; reserved macro names are refused. - @ExitValue: Number. How many line breaks were found, or 1 when the total went into your variable instead.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\daily.txt|eggs\nmilk\neggs\nbread\n)**FileLineCount(@Desktop\daily.txt)**MessageBox(Line count|@ExitValue lines in daily.txt on your desktop.)- writes a list with a duplicate line, then counts its line breaks.FileWriteData(@Desktop\daily.txt|eggs\nmilk\nbread\n)**FileLineCount(@Desktop\daily.txt|line_total)**MessageBox(Lines|daily.txt holds @line_total lines.)- keeps the total in a variable and shows it.FileWriteData(@Desktop\daily.txt|eggs\nmilk\nbread\n)**FileLineCount(@Desktop\daily.txt|line_total)**If(@line_total|0)**MessageBox(Empty|daily.txt has no lines yet.)**Else()**MessageBox(Lines|daily.txt holds @line_total lines.)**EndIf()- counts, then reports an empty file differently.
See also: FileReadData(), FileSize(), Num2Words(),
VarAssign(), WordCount()
FileList()
- FileList(Folder|Pattern|Options|Variable)
- List a folder's files into your specified
@UserVariable, one per line. - Parameters:
Folder: full path to a directory. @Macro values are fine.Patterna standard Windows wildcard, e.g. "*.txt". Leave it empty to use the standard "all files" pattern (*);Options: a semicolon-sparated list of options in any order, choose from;recurse(digs into the whole tree from whatevr root you specify) andfullpaths(lists full file paths rather than only file names).Variable: your specified @UserVariable.
FileList()tellsListView()when it filled a @UserVariable with a file list soListView()will recognise it so, enabling its live view option.- @ExitValue: Number; how many files matched your pattern. A missing folder or zero matches; the variable is cleared and @ExitValue is set to false.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileList(@Desktop|||desktopfiles)**ListView(@desktopfiles|Desktop files)- lists everything on the desktop, then shows it.FileList(@Desktop||recurse|desktopfiles)**ListView(@desktopfiles|All files)- walks the desktop folders, then shows everything found.FileList(@Desktop||recurse;fullpaths|MyPaths)**ListView(@MyPaths|Desktop paths)**WinMove(@WorkAreaLeft|@WorkAreaTop|(@WorkAreaRight-@WorkAreaLeft)/2|@WorkAreaBottom-@WorkAreaTop|@ExitValue)- lists full paths, then shows them in aListView()which fills the left side of your desktop's working area. Note use of @ExitValue to capture theListView()'s handle, for exact window matching.FileList(@Desktop||recurse;fullpaths|MyPaths)**ListView(@MyPaths|Desktop paths)WinMove(@WorkAreaLeft|@WorkAreaTop|(@WorkAreaRight-@WorkAreaLeft)/3|@WorkAreaBottom-@WorkAreaTop|@ExitValue)- same again, but only using a third of your desktop.FileList(@Desktop||recurse;fullpaths|MyPaths)**ListView(@MyPaths|Desktop paths)**WinMove(0|0|@DesktopWidth/3|@DesktopHeight|@ExitValue)- once again, but using simple @Desktop-based calculations (ignores your taskbar).
See also: FileReadData(), FolderCopy(), ListView()
FileMove()
- FileMove(Source|Destination[|1/true/9])
- Move a file to another location.
- For scripters: use 9 instead of 1 when the destination folders might not exist yet; it replaces existing files and creates any missing parent folders.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\report-incoming.txt|this month's report\n)**FileMove(@Desktop\report-incoming.txt|@Desktop\report-archived.txt)**MessageBox(Moved|report-archived.txt is on your desktop, the original is gone.)- writes a report, moves it and confirms.FileWriteData(@Desktop\report-incoming.txt|this month's report\n)**FileWriteData(@Desktop\report-archived.txt|old version\n)**FileMove(@Desktop\report-incoming.txt|@Desktop\report-archived.txt|true)**MessageBox(Moved|Archive overwritten on your desktop.)- moves the report on, replacing any file with the same name.VarAssign(archive|@Desktop\Archive-@Year)**FolderCreate(@archive)**FileWriteData(@Desktop\report-incoming.txt|this month's report\n)**FileMove(@Desktop\report-incoming.txt|@archive\report-archived.txt|1)**MessageBox(Archived|Filed under Archive-@Year on your desktop.)- creates a dated archive and moves the report into it.
See also: FileCopy(), FolderMove()
FileOpenDialog()
- FileOpenDialog(Title|Dir[|Filter|Options|Default])
- Ask the user to pick a file. Empty parameters use defaults; filter default is:
All (*). - Options are supplied as a single integer: add the flag values before typing the result, for example
3combines 1 and 2. Expressions such as1+2are not evaluated. Default 0 does not require an existing file or path. KeyBind removes flag 4 (multiple selection), so each dialog returns one file. Supported flags:1= file must exist2= path must exist8= prompt to create
- Separate filter groups with semicolon "
;". A;that lists file extensions is left exactly as you typed it; if you usedLog (*.log;*.txt);All (*)you get two groups, the log (.txt & .log) pair kept together, and "All Files" as a separate entry. - @ExitValue: the picked path.
- A dismissed dialog aborts the task queue; nothing after it runs.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileOpenDialog(Pick a file|@Desktop)**MessageBox(@ExitValue)- picks a file, then shows the path.
See also: FileSaveDialog(), FolderSelect(),
MessageBox()
FileReadData()
- FileReadData(File|Variable)
- Read a text file into a user variable, ready for later steps in your task.
- @ExitValue: 1 if the value is stored in your named variable, or 0 if storing it fails. A reserved @Macro name cannot be used for a user variable; trying it returns the text
That, Macro Is Reserved!without storing a value. - Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\message.txt|Hello from your desktop!\nSecond line here.\n)**FileReadData(@Desktop\message.txt|message)**MessageBox(File contents|@message)- writes a message file, reads it into@messageand displays it.FileWriteData(@Desktop\announcement.txt|Good morning! KeyBind read this file aloud.\n)**FileReadData(@Desktop\announcement.txt|announcement)**Speak(@announcement)- writes an announcement and reads it aloud.
See also: FileAppendData(), FileWriteData(), Variable Commands
FileSave()
Alias of FileWriteData()
FileSaveDialog()
- FileSaveDialog(Title|Dir[|Filter|Options|Default])
- Ask the user to name a file to save. Same slots as
FileOpenDialog(), except options fall back to16(prompt before overwriting). - For all the flags, see
FileOpenDialog()- same set. Separate filter groups with;, and a dismissed dialog aborts the task queue. - @ExitValue: the saved file path.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileSaveDialog(Save notes|@Desktop|Text files (*.txt))**VarAssign(FileName|@ExitValue)**FileSave(@FileName|Hello from KeyBind!\n)**MessageBox(Saved to @FileName)- picks a path and saves a note there.
See also: FileOpenDialog(), FolderSelect(),
MessageBox()
FileSize()
- FileSize(File[|Unit])
- Find out how large a file is, ready for the next step in your task.
- @ExitValue: Number. The size, in the units asked for.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\archive-demo.txt|pretend archive contents - @Time\n)**FileSize(@Desktop\archive-demo.txt|KB)**MessageBox(Archive size|archive-demo.txt is @ExitValue KB.)- writes a demo file and displays its size.FileWriteData(@Desktop\archive-demo.txt|pretend archive contents\n)**FileSize(@Desktop\archive-demo.txt)**VarAssign(archive_size|@ExitValue)**IfNot(@archive_size|0)**FileAppendData(@Desktop\sizes.log|archive-demo.txt: @archive_size bytes\n)**MessageBox(Logged|Size kept in sizes.log on your desktop.)- saves the result, then logs it only when the file is not empty.
See also: FileTime(), If(), Variable Commands
FileTime()
- FileTime(File[|1/2])
- Get a file's last modified time as
YYYY/MM/DD HH:MM:SSin@ExitValue. - @ExitValue: Text. The timestamp.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\report.txt|weekly report - @Date\n)**FileTime(@Desktop\report.txt)**MessageBox(Report|Last modified: @ExitValue)- writes a report and displays its timestamp.FileWriteData(@Desktop\report.txt|weekly report\n)**FileTime(@Desktop\report.txt|1)**FileAppendData(@Desktop\file-times.log|report.txt created: @ExitValue\n)**MessageBox(Logged|Creation time kept in file-times.log on your desktop.)- records the creation timestamp in a log.
See also: FileSize(), If(), Variable Commands
FileWriteData()
- FileWriteData(Destination|Data)
- Write data to a file, replacing any existing contents.
FileSave()is an alias ofFileWriteData().- Use
FileReadData()first if you want another file's contents. - @ExitValue: Number. 1 on a successful write, 0 on failure; this is a status, not a byte count.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\status.txt|Ready at @Time on @Date.\n)**MessageBox(Written|See status.txt on your desktop.)- creates a timestamped status file and confirms.Count(+1)**FileWriteData(@Desktop\file-@Count.txt|File number @Count written at @Time.\n)**MessageBox(Written|See file-@Count.txt on your desktop.)- increments the counter, then writes the next numbered file to your desktop.Input(Status|What should the status be?|status)**FileWriteData(@Desktop\status.txt|@status)- writes user input to a file.
See also: FileAppendData(), FileCreate(),
FileReadData()
FindReplace()
- FindReplace(Source|Find|Replace|Variable)
- Find and replace text using regular expression, saving the result to a variable. The source text is not changed.
sourcetext can be:@Selected(your current text selection),@ClipBoard, a@UserVariable, or some literal text.- Find is always a regular expression, so you must escape punctuation (
\.,\\,\$). Replace may use\1backreferences, or stay empty to delete matches. - @ExitValue: the number of replacements made.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFindReplace(the cat sat|cat|dog|result)**MessageBox(@result)- swaps a word and shows "the dog sat".VarAssign(notes|total: $19 and $6)**FindReplace(@notes|\$[0-9]+|[redacted]|censored)**MessageBox(@censored)- stores a price note, then censors both prices (note the escaped dollar sign), showing "total: [redacted] and [redacted]".FindReplace(2026-10-07|(\d{4})-(\d{2})-(\d{2})|\3/\2/\1|fixed)**MessageBox(@fixed)- don't like my date style, then switch it!FindReplace(1234567|(\d)(?=(\d{3})+$)|\1,|grouped)**MessageBox(@grouped)- a nice thousands separator for your long numbers (uses groups, nested groups, lookahead, backreference, the whole shebang!).FindReplace(totalNodesValue|(?<=[a-z])(?=[A-Z])| |spaced)**MessageBox(@spaced)- CamelCase splitter! (lookbehind plus lookahead, what fun!).
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), Cut(), CutAppend(),
DeDupeLines(), Num2Words(), Paste(),
PastePlainText(), PasteSlot(), SortLines(),
VarAssign(), WordCount()
FolderCopy()
- FolderCopy(Source|Destination[|1/true])
- Copy a folder and its contents to another location.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFolderCreate(@Desktop\Project-demo)**FileWriteData(@Desktop\Project-demo\notes.txt|demo\n)**FolderCopy(@Desktop\Project-demo|@Desktop\Project-demo-backup)**MessageBox(Copied|See Project-demo-backup on your desktop.)- builds a demo project folder, copies it and confirms.FolderCopy(@Desktop\Project-demo|@Desktop\Project-demo-backup|true)**MessageBox(Copied|Backup overwritten on your desktop.)- backs up the demo project, replacing older copies.
See also: FileCopy(), FolderMove()
FolderCreate()
- FolderCreate(Folder)
- Create a folder, including missing parent folders.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFolderCreate(@Desktop\New Project)**MessageBox(Created|See New Project on your desktop.)- creates the folder and confirms.FolderCreate(@Desktop\Projects-@Year\New Project)**Launch(@Desktop\Projects-@Year\New Project)- creates a dated project folder and opens it.
See also: FileCreate(), FolderCopy(), FolderMove()
FolderMove()
- FolderMove(Source|Destination[|1/true])
- Move a folder and its contents to another location.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFolderCreate(@Desktop\Finished-demo)**FileWriteData(@Desktop\Finished-demo\notes.txt|done\n)**FolderMove(@Desktop\Finished-demo|@Desktop\Finished-archived)**MessageBox(Moved|See Finished-archived on your desktop.)- builds a finished folder, moves it and confirms.FolderCreate(@Desktop\Finished-demo)**FolderMove(@Desktop\Finished-demo|@Desktop\Finished-archived|true)**MessageBox(Moved|Destination overwritten on your desktop.)- moves it on, replacing any folder with the same name.VarAssign(archive|@Desktop\Archive-@Year)**FolderCreate(@archive)**FolderCreate(@Desktop\Finished-demo)**FolderMove(@Desktop\Finished-demo|@archive\Finished-demo|1)**MessageBox(Archived|Filed under Archive-@Year on your desktop.)- moves a completed project into this year's archive.
See also: FileMove(), FolderCopy()
FolderSelect()
- FolderSelect(Text|Root[|Flag|Dir])
- Ask the user to pick a folder. Empty slots fall back to entry defaults; the flag falls back to
7. - Flags are plain numbers, add them for combinations:
1= new-folder button,2= new dialog,4= edit field. A dismissed dialog aborts the task queue. - @ExitValue: the picked folder.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFolderSelect(Pick a folder|@Desktop)**MessageBox(@ExitValue)- picks a folder, then shows the path.
See also: FileOpenDialog(), FolderCreate(),
MessageBox()
FolderSync()
- FolderSync(Source|Destination[|Option...])
- Mirrors a folder onto another
- KeyBind spins up a second process for this, but it has a blue icon, so, you know, BLUE ICON!
- Hover over the blue KeyBind icon for details of what Sync job is running.
- With no parameters, KeyBind creates a perfect mirror of your source folder in the Destination New files copy over, changed files are replaced, and files and folders gone from the source are deleted from the target, leaving a 100% match. The tray tip shows the sync while a worker lives; hovering the worker's own tray icon shows its source, target and percent complete.
- Options are plain words in any order, and you can stack them:
newonlyonly adds missing files,nodeletekeeps old target files, andreportchanges nothing and instead hands the job to a worker that saves the full list of what the sync would do to your Server folder, then asks if you want to read it. - @ExitValue: True once the job is queued.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFolderCreate(@Desktop\Sync-demo-source)**FileWriteData(@Desktop\Sync-demo-source\hello.txt|Hello sync!\n)**FolderSync(@Desktop\Sync-demo-source|@Desktop\Sync-demo-backup)**MessageBox(Sync queued|Watch the blue icon - the mirror lands on your desktop.)- mirrors a desktop demo folder for backup without freezing KeyBind.FolderSync(@Desktop\Sync-demo-source|@Desktop\Sync-demo-backup|nodelete)**MessageBox(Sync queued|Deleted files stay in the backup this time.)- same, but files you deleted from the project stay in the backup.FolderSync(@Desktop\Sync-demo-source|@Desktop\Sync-demo-backup|report)**MessageBox(Report queued|The full plan saves to Server and asks if you want to read it.)- saves the full plan to your Server folder and asks if you want to read it, changing nothing.
See also: FolderCopy(), FolderMove()
ForEach()
- ForEach(List|Task)
- Run the task once for each nonempty list entry, in the order supplied.
@Itemcontains that entry. The task can be a command, a**chain, or a.kcscript path. - Supply text with
\nseparators, actual line breaks inside the command, a user variable such as@files,@ClipBoard,@Selected,@ExplorerSelection, orfile:C:\Lists\jobs.txt. The file path accepts @Macros. Text files use real line breaks and accept several encodings, including UTF-8 and UTF-16 with a byte-order mark (BOM). - In a list typed directly into the command,
\nand\rseparate entries, and\\gives a literal backslash. Lists supplied through @Macros, variables or files keep their backslashes as written. LF, CRLF and CR line breaks all separate entries. Empty entries are skipped; spaces and duplicate entries are kept. A final line break does not add an item. Use a variable or file when an entry contains|, because the first pipe in the command separates its list from its task. - When a task opens several dialogs that pause mouse click/wheel triggers, those triggers pause once and resume when the task finishes, stops with an error or is cancelled. This also applies to nested scripts and repeated
ForEach()items. A clipboard/history viewer that keeps these triggers paused retains that pause until the last such viewer closes. OutsideForEach(),Wait()lets the triggers resume while waiting for its window; the remaining commands can pause them again when they run. Enabled hook notifications announce the first pause and final restart. Triggers restart only if enabled, using your current low-level hook or Raw Input setting. - The list is read once. Changing its source during the task does not change the remaining entries. Nested iterations restore the outer
@Item; unrelated triggered tasks start with an empty@Item. Entries are not saved to configuration files. - Inside
ForEach(),Wait()waits for its window before the rest of that item's task runs; the next item waits its turn. KeyBind continues checking events during the wait. If a supplied timeout expires, the loop stops. OutsideForEach(),Wait()saves the remaining commands to run after the window appears.Abort()stops the operation by restarting KeyBind.Suspend()disables triggers; it does not stop a task already running. - @ExitValue: Number of items completed. An empty list returns 0. Invalid parameters, an unreadable file, or an error reported by task execution stops iteration; the failing item is not counted. A task result of False, 0 or empty text alone is not an execution error. Actions already performed are not rolled back.
- Examples:
Click to select a complete example, then press
Ctrl+Win+Alt+Rto run it in KeyBind.@ExplorerSelectionsupplies selected Explorer files and folders as full paths, one per line. Capture happens once for the task. UseForEach(@ExplorerSelection|MessageBox(Selected item|@Item))from a HotKey or saved tray script. See the @ExplorerSelection examples for a complete two-file test folder and ways to copy or save the list.Each file example creates its own inputs in a new timestamped
KeyBind-ForEach-...folder under@TempDir. Generated files remain there for inspection. The file-picker example supplies a sample list and also lets you choose your own. Example variables such as@foreach_demoexist in memory and are not saved to the INI.The first
Assign()expands@Year@Mon@Mday-@Hour@Min@Sec@MSecinto the demo-folder name and assigns the complete path to@foreach_demo. Later commands use that variable. The copy demo displays the expanded path in its list-viewer title, so you can see where its files were created. The filenames themselves areone.txtandtwo.txt.- Three literal entries
ForEach(red\ngreen\nblue|MessageBox(Item|@Item))
Show red, green and blue in three successive dialogs. - Create files, list them and copy each one
Assign(foreach_demo|@TempDir\KeyBind-ForEach-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FolderCreate(@foreach_demo\Copies)**FileWriteData(@foreach_demo\Source\one.txt|First example file.)**FileWriteData(@foreach_demo\Source\two.txt|Second example file.)**FileList(@foreach_demo\Source|*.txt|fullpaths|foreach_files)**ForEach(@foreach_files|FileCopy(@Item|@foreach_demo\Copies\))**FileList(@foreach_demo\Copies|*.txt||foreach_files)**ListView(@foreach_files|Two files created and copied in @foreach_demo)**Launch(|@foreach_demo\Copies)
Create two text files and the destination folder, copy both files usingFileList()andForEach(), then show one.txt and two.txt as selectable rows with the actual timestamped demo-folder path in the title. Copies opens in Explorer without waiting for the list viewer to close. No existing files are required. - Create a text file containing the list
Assign(foreach_demo|@TempDir\KeyBind-ForEach-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FileWriteData(@foreach_demo\jobs.txt|red\n\ngreen\nblue\n)**ForEach(file:@foreach_demo\jobs.txt|MessageBox(File entry|@Item))
Create jobs.txt with actual line breaks and a blank line, then display its three nonempty entries. The blank line and final line break do not produce dialogs. - Select a list file
Assign(foreach_demo|@TempDir\KeyBind-ForEach-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FileWriteData(@foreach_demo\jobs.txt|red\ngreen\nblue\n)**FileOpenDialog(Select a text file containing one entry per line|@foreach_demo|Text (*.txt);All (*)|3|jobs.txt)**ForEach(file:@ExitValue|MessageBox(Selected file entry|@Item))
Create a sample jobs.txt, then open the file picker in its folder. Select that file or browse to your own list file. The chosen file is read without modification; dismissing the picker stops the task. - Read real line breaks into a variable
Assign(foreach_demo|@TempDir\KeyBind-ForEach-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FileWriteData(@foreach_demo\list.txt|first\nsecond\nthird\n)**FileReadData(@foreach_demo\list.txt|foreach_list)**ForEach(@foreach_list|MessageBox(Variable entry|@Item))
Create a three-line file, read its contents into @foreach_list, then display each entry. The variable contains actual line breaks, rather than the two literal characters backslash and n. - Run two commands for every entry
Assign(foreach_demo|@TempDir\KeyBind-ForEach-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FileWriteData(@foreach_demo\results.txt|)**ForEach(red\ngreen\nblue|FileAppendData(@foreach_demo\results.txt|Processing @Item\n)**FileAppendData(@foreach_demo\results.txt|Finished @Item\n))**FileReadData(@foreach_demo\results.txt|foreach_result)**ListView(@foreach_result|Two commands per entry)
Create a results file, append a Processing line and a Finished line for each colour, then display the six resulting lines. - Nested iteration restores the outer entry
Assign(foreach_demo|@TempDir\KeyBind-ForEach-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FileWriteData(@foreach_demo\results.txt|)**ForEach(A\nB|FileAppendData(@foreach_demo\results.txt|Outer @Item\n)**ForEach(1\n2|FileAppendData(@foreach_demo\results.txt|Inner @Item\n))**FileAppendData(@foreach_demo\results.txt|Back to outer @Item\n))**FileReadData(@foreach_demo\results.txt|foreach_result)**ListView(@foreach_result|Nested iteration)
Create and display a log showing outer A, inner 1 and 2, restored outer A, then the same sequence for B. - Empty lines, spaces and duplicates
ForEach(red\n\n blue \nred\n|MessageBox(Item boundaries|[@Item]))
Display [red], [ blue ] and [red]. Brackets make the preserved spaces visible. Empty entries are skipped and duplicates run again. - Create and run a .kc script
Assign(foreach_demo|@TempDir\KeyBind-ForEach-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FileWriteData(@foreach_demo\item.kc|MessageBox(Script demo|This command was read from the generated .kc file.))**ForEach(first\nsecond|MessageBox(Current entry|@Item)**@foreach_demo\item.kc)**Launch(|@foreach_demo)
Create item.kc containing a fixedMessageBox()command. For each entry, display the current @Item and then run that script. Finally open the generated folder so you can inspect the script. - Use the completed-item count
ForEach(red\ngreen\nblue|Assign(foreach_last|@Item))**MessageBox(Completed|@ExitValue items processed; last entry: @foreach_last.)
Process three entries without intermediate dialogs, then report 3 items processed and blue as the last entry.
- Three literal entries
See also: FileList(), Wait()
GetWindow()
- GetWindow(Window)
- Returns the geometry of a specific window.
On success, populates
@WindowX,@WindowY,@WindowWidthand@WindowHeight, which you can use later. - Supply the window's title (your "friendly" name for some app is fine, if you have one configured), and KeyBind will immediately return its geometry.
- For more details about window matching, see window matching in
Activate(). - @ExitValue: The window handle (a number), or false when nothing matched.
Until set, these @Macros will be whatever your desktop is, something like, 0, 0, 2560, 1440 (a 2K display).
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**GetWindow(Notepad)**MessageBox(Notepad geometry|X: @WindowX, Y: @WindowY, @WindowWidth x @WindowHeight.)- opens Notepad, measures it and shows the numbers. Note: if Notepad++ was more recently top-most, that matches instead.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**GetWindow(<CLASS:Notepad>)**MessageBox(Notepad geometry|Handle @ExitValue at @WindowX, @WindowY, @WindowWidth x @WindowHeight.)- same, but matches onlyNotepad.exe, which is what we actually want.
See also: Activate(), CloseWindow(), Dimensions(),
KillWindow(), Maximize(), Minimize(),
Restore(), WindowOnTop(), WinMove()
HIIT()
- HIIT([total|work|rest])
- Well, if you have a CountDown timer, of course you are going to re-use it for an HIIT Timer!
- This function starts up a High-Intensity Interval Training workout timer. There is a "Get Ready" period, then "Work" and "Rest" periods alternate until the total workout time expires.
- Each period starts with a spoken
Work!
orRest!
alert, using your speech voice, rate and volume. Or not, it's optional; but Microsoft Heera telling me to work always gets me going! - Run
HIIT()on its own to use your saved defaults, or supply whatever parameters you need to override for this workout (it won't change your saved defaults). - See
CountDown()for full details of how the mini window works. - Right-click the digits for live options.
- The configured "Get Ready" period and spoken message apply to all HIIT workouts. Note: there are always pips during the get ready period.
- You can configure the "Get Ready" messages, as well as the "Work, you lazy bastard!" (or whatever) and "And, Rest" messages, using whatever voices you prefer (Sadly there is no Queeg 500 voice for the "Work!" periods, that I know of).
- You can have pips sound over the final five seconds of your work period, or throughout the entire work period, all configurable, of course. We use the
SystemBeep()command for this, as it's much faster than our regular fancyBeep()commands, and you are more likely to get a nice regular 1s beep this way, albeit with Sine wave only. - Multiple HIIT and CountDown timers can run independently, though that sounds like madness. A normal KeyBind shutdown or reload preserves running and paused workouts; you are not getting off that easily! Running workouts remember their end time while KeyBind is closed; paused workouts remain paused, wuss!
- Changes to HIIT settings are applied live to all running HIIT timers.
- @ExitValue: the full timer window handle on success; False for invalid durations or a window creation failure.
- Examples:
HIIT()- HIIT workout using your saved defaults.HIIT(4m|40s|20s)- four rounds of 40 seconds Work and 20 seconds Rest, lasting four minutes total (the default).HIIT(50s|40s|20s)- 40 seconds Work followed by 10 seconds Rest.HIIT(5m|1m|30s)- alternates one minute Work and 30 seconds Rest for five minutes; the workout ends 30 seconds into the final Work period.
See also: CountDown(), Beep(), Speak()
History()
Alias of ShowRunHistory()
HotKeyControl()
See HotKeyControl() under *Control().
HttpGET()
- HttpGET(URL[|Key=Value...]|Variable)
- Fetch a web address and put the response text in a variable. Write
HttpGET(URL|Variable), or add query values between them:HttpGET(URL|name=value|other=value|Variable). The first|ends the URL; the last starts the variable name. Both the URL and variable name are required. - Separate query values with
|or&. KeyBind joins them into the URL after?, using&between values. Query text already present in the URL is kept before any added values. Without query values, the command fetches the URL directly. - Type ordinary text for the added names and values; KeyBind converts spaces and other special characters into the form required by a URL. Text you have already encoded, such as
%20, is encoded again. A|or&typed inside a value separates it into another query value. Query text already included in the URL is kept as supplied. - The variable name may start with
@. Its name must begin with a letter A-Z or an underscore, followed only by letters A-Z, digits or underscores. Reserved @Macro names cannot be used. An invalid name or empty URL stops the command before anything is sent. Use-instead of a variable name to fetch without storing a response or changing any variable. - @Macros and user variables are expanded in the URL and query values. The destination variable name is used as written; it is not replaced with that variable's contents. If the URL has no
://, KeyBind addshttps://. - KeyBind waits up to 10 seconds to look up the server address, 10 seconds to connect, 15 seconds to send and 15 seconds to receive. These limits apply separately, so they are not a single limit for the whole request.
- A response status from 200 to 299 stores the response text exactly as received: arithmetic-looking text is not calculated, and delimiter characters are preserved. If the request fails or receives another status, the destination variable is cleared. A rejected command that never sends a request leaves the variable unchanged.
- @ExitValue and @HttpStatus contain the response status, such as 200 or 404, or 0 if no status was received.
@HttpStatuskeeps that value until the next HTTP request. Test the result withIf(@ExitValue|200). A response may contain no text, even when successful. - The command can fail because its parameters or variable name are invalid, the network request fails, the server returns a status outside 200-299, Windows cannot create the request, or the response cannot be stored. Check the response status to distinguish a server response from a request that received no status.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindHttpGET(https://corz.org/windows/software/keybind/example.php|page)**MessageBox(Front page|@page)- fetches the example front page into@pageand shows it.HttpGET(https://corz.org/windows/software/keybind/example.php|name=KeyBind|foo=bar|bar=foo|foobar=barfoo|page)**MessageBox(Args|@page)- sends four query parameters and shows the echoed reply.HttpGET(https://corz.org/windows/software/keybind/example.php|-)**If(@ExitValue|200)**MessageBox(OK|corz.org answered with HTTP Code: 200. SUCCESS!)**EndIf()- fetches without storing and tests the status code.
See also: DefineSelected(), Download(), HttpPOST(),
Launch(), Url(), VarAssign(), WebSearchSelected()
HttpPOST()
- HttpPOST(URL|Body|Variable)
- Send data to a web address. Supply all three parts:
HttpPOST(URL|Body|Variable). The first|ends the URL; the last starts the variable name. Everything between them is the data to send. - For ordinary form values, write
name=valuepairs separated by|or&. KeyBind converts each name and value into the form required by a web request. Type ordinary text; text already encoded, such as%20, is encoded again. A|or&typed inside a value starts another pair. - To send JSON, start the body with
{or[; spaces and line breaks before that opening character are allowed. KeyBind sends it asapplication/json. Valid JSON is sent unchanged, including any|characters inside it. - For invalid JSON typed into the command, KeyBind tries these repairs in order: remove commas immediately before closing
}or]characters; remove trailing semicolons; add one missing outer}or], trying it first without further cleanup, then with trailing commas and semicolons removed, then also removing commas before closing characters; remove surplus closing braces, commas or semicolons after one complete JSON value. It uses the first attempt that produces valid JSON. It does not rewrite inner quotes, names, colons or nesting. - A successful repair shows
Your JSON had to be repaired. If no repair succeeds, KeyBind sends the original JSON and showsKeyBind could not fix your JSON. JSON sent as-is. Check your syntax.The server then decides whether to accept it. - To send a text file as a form value, use
name=file:path. To upload a file, usename=upload:path; this sends its original file name and binary contents in the format used for file uploads. The file must exist and be readable, otherwise nothing is sent. Prefixes are case-insensitive. - To send a JSON file as the whole body, use
JSONfile:path. To use its JSON text as a form value, usename=JSONfile:path. The file must exist, be readable and contain valid JSON; otherwise nothing is sent. File contents used as form values stay together, including any|or&characters. Inside a JSON body,file:,upload:andJSONfile:are ordinary text and do not read files. - On a response status from 200 to 299, your variable receives
Success!andPOST command senton separate lines, followed by the response text if there is any. For another status, it receivesPOST ERROR!, then the status and any response text. If no status is received, the message saysno response receivedand includes available error details. A rejected command that never sends a request leaves the variable unchanged. - The variable-name rules,
-option, @Macro expansion, defaulthttps://, time limits and response statuses are described underHttpGET(). Here @Macros and user variables are expanded in the URL and body.@ExitValueand@HttpStatuscontain the response status, or 0 if none was received. - Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindHttpPOST(https://corz.org/windows/software/keybind/example.php|{"hello": "world"}|reply)**MessageBox(Result|@reply)- posts JSON;@replyholds the success message.VarAssign(payload|{"name": "KeyBind"})**HttpPOST(https://corz.org/windows/software/keybind/example.php|@payload|reply)**MessageBox(Echoed|@reply)- builds the JSON in a variable first, then posts it.HttpPOST(https://corz.org/windows/software/keybind/example.php|JSONfile:@Desktop\payload.json|reply)**MessageBox(Result|@reply)- posts a JSON file after validating it; invalid JSON fails before anything is sent.HttpPOST(https://corz.org/windows/software/keybind/example.php|token=file:@Desktop\token.txt|reply)**MessageBox(Result|@reply)- posts the text contents of token.txt as the token value.HttpPOST(https://corz.org/windows/software/keybind/example.php|name=KeyBind|type=hotkey|reply)**MessageBox(Reply|@reply)- posts form parameters, split on|.HttpPOST(https://corz.org/windows/software/keybind/example.php|name=KeyBind|type=hotkey|-)**If(@ExitValue|200)**MessageBox(Sent|example script answered 200.)**EndIf()- posts without storing and tests the status code.HttpPOST(https://corz.org/windows/software/keybind/example.php|name=KeyBind|type=hotkey|reply)**ListView(@reply|Echo)- the example script answers with a cute message and an ordered list of the variables sent.FileOpenDialog(Pick an image|@Desktop|Images (*.png;*.jpg;*.gif;*.webp)|1)**HttpPOST(https://corz.org/windows/software/keybind/example.php|image=upload:@ExitValue|reply)**If(@ExitValue|200)**FindReplace(@reply|(?s)^.*\n||imgurl)**Url(@imgurl)**Else()**MessageBox(Upload failed|@ExitValue: @reply)**EndIf()- picks an image, uploads it, and opens the viewer URL from the reply; a failed upload shows the status code and the reply instead.FileOpenDialog(Pick a file|@Desktop)**HttpPOST(https://corz.org/windows/software/keybind/example.php|files[0]=upload:@ExitValue|reply)**If(@ExitValue|200)**FindReplace(@reply|(?s)^.*\n||fileurl)**Url(@fileurl)**Else()**MessageBox(Upload failed|@ExitValue: @reply)**EndIf()- picks any file, uploads it as a real multipart file part, and opens the returned viewer URL; a failed upload shows the status code and the reply instead.
See also: DefineSelected(), Download(), HttpGET(),
Launch(), Url(), VarAssign(), WebSearchSelected()
If()
- If(Value[|Expected])
- Run the rest of the task when information matches, a value is present, or a file or folder exists.
- @ExitValue: True or false. Whether the condition matched.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindInput(Reminder|What do you need to remember?|reminder)**If(@reminder)**FileAppendData(@Desktop\reminders.txt|@reminder\n)- adds a reminder only when you enter some text.FileWriteData(@Desktop\mode.txt|quiet\n)**FileReadData(@Desktop\mode.txt|mode)**If(@mode|quiet)**SetVolume(0)**MessageBox(Quiet mode|File said quiet - volume muted.)**Else()**MessageBox(Loud mode|File said otherwise - volume untouched.)**EndIf()- uses information read from a desktop file to control what happens next.
See also: Else(), EndIf(), IfNot(),
IfRunning()
IfNot()
- IfNot(Item[|Comparison])
- Continue the remaining task when a named value differs from the value you specify. With no comparison value, continue when the item is empty, false, or a file/folder does not exist.
- @ExitValue: True or false. Whether the condition matched.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\notes-template.txt|Template - @Date\n)**IfNot(@Desktop\notes.txt)**FileCopy(@Desktop\notes-template.txt|@Desktop\notes.txt)**MessageBox(Created|notes.txt was missing - built from the desktop template.)**Else()**MessageBox(Exists|notes.txt already on your desktop - left alone.)**EndIf()- creates notes from a template only when the file is missing.Input(Status|Current status?|status)**IfNot(@status|complete)**Beep(440|500ms)- sounds a warning unless the answer is "complete".
See also: Else(), EndIf(), If()
IfRunning()
- IfRunning(Program/Process ID)
- Check whether a program or process is running. Its process ID goes into
@ExitValue, or 0 if it is not running. UseIf()orIfNot()to decide what happens next. - @ExitValue: Number. The process ID, or 0 when it is not running.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindIfRunning(notepad++.exe)**If(@ExitValue)**MessageBox(Running|Notepad++ is open - process @ExitValue.)**Else()**MessageBox(Not running|Launch Notepad++ and try again.)**EndIf()- reports whether Notepad++ is running.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**IfRunning(notepad.exe)**If(@ExitValue)**Text(Inserted by KeyBind)**EndIf()**MessageBox(Typed|Notepad was running, so the line went in.)- opens Notepad, types only when it is running, then confirms.
See also: If(), KillProcess(), Terminate()
InfoBox()
- InfoBox(Title[|Message|X|Y|Timeout|On Top])
- Very similar to
MessageBox()and using the same parameters. Give the title first, then the message. Unlike theMessageBox(), when there are more commands to process, KeyBind keeps processing later command while theInfoBox()stays open. Close it with its X or sendInfoBox(close). There is no "OK" button. - Creating a new
InfoBox()replaces any savedInfoBox()settings. You can also set an empty value to clear that value from your ini; see examples below. InfoBox(open)andInfoBox(close)can be used to open and close an existingInfoBox()without changing its settings. If there is no saved title to open, or no open box to close, the command fails gracefully.- The box displays the full title and message. Message can use
\nfor real line breaks and\\for literal backslashes. Each saved value is limited to 512 characters after encoding; any longer and it simply doesn't get saved. Without a saved message,InfoBox(open)uses the title. Without a title supplied or saved,InfoBox(open)fails. - If you move the
InfoBox(), its new position will be used for futureInfoBox()calls, until the X & Y are mindfully set or deleted by anotherInfoBox()command. - Click anywhere in a
InfoBox()to close it. - @ExitValue: True if the box showed successfully.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindInfoBox(Backup is complete!)- shows the same text in the title and message, using any saved position, or centred if no saved position exists.InfoBox(Status|Backup is complete!)- Specifying a different title and message.InfoBox(Status|-)- Uses the previously used (saved) message.InfoBox(Update!|)- Wipes the saved message.InfoBox(Status|Backup is complete!|200|150)- opens at X 200, Y 150.InfoBox(Status|Backup is complete!|-|-|3s|on)- using saved X/Y position, stays on top and closes after three seconds.InfoBox(ERROR!|There has been an error!|||0|on)- wipes saved X/Y position, opens dead centre, stays on top and does not close automatically.InfoBox(open)- reopens the lastInfoBox()using stored settings (title/message/x/y/etc.).InfoBox(close)- closes the openInfoBox().
See also: MessageBox(), ProgressBar()
Input()
- Input(Title|Prompt|Variable)
- Ask for some text, then keep the answer in a user variable for later steps.
- @ExitValue: Number. 1 when assignment succeeds. The answer is stored in the named user variable, not returned as @ExitValue. Invalid parameter counts or a variable name longer than 16 characters return False.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindInput(Say Something!|Please enter some text to be spoken|spokentext)Input(Say Something!|Please enter some text to be spoken|spokentext)**Speak(@spokentext)Input(Open Folder|Enter a folder path|folder)**Launch(@folder)- asks for a folder, then opens it.Input(Set Volume|Enter a number from 0 to 100|volume)**SetVolume(@volume)- turns an answer directly into an action.Input(Add to Log|What happened?|note)**FileAppendData(@Desktop\activity.log|@Time - @note\n)- collects a note and adds it to a timestamped log.
See also: FileReadData(), Variable Commands
KeyDelay()
- KeyDelay(INT/+INT/-INT/-)
- Change the delay between simulated key presses for the rest of the current task, in milliseconds.
- @ExitValue: Number. The previous delay.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**KeyDelay(40)**Text(This is typed slowly so you can see each character land.)**KeyDelay(-)**MessageBox(Normal speed|Delay restored - type to compare.)- slows one piece of typing into Notepad, then restores the normal delay.Input(Slow Echo|Type something to watch it echo slowly|echo)**Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**KeyDelay(30)**Text(@echo)**KeyDelay(-)- types your own words into Notepad at a visible pace, then restores speed.
See also: Date(), Text(), Time()
KillProcess()
- KillProcess(Program/Process ID)
- Force a program or process to stop.
- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(calc.exe)**Wait(Calculator|5s)**MessageBox(About to kill Calculator|KeyBind opened this to show KillProcess() working.)**KillProcess(calc.exe)**MessageBox(Killed|Calculator was forced to stop.)- opens Calculator, then force-stops it.
See also: IfRunning(), KillWindow(), Terminate()
KillWindow()
- KillWindow(Window)
- Force-close a matching window.
- See window matching in
Activate(). - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**MessageBox(About to kill Notepad|KeyBind opened this empty note to show KillWindow() working - nothing to lose.)**KillWindow(Untitled - Notepad)- opens an empty note, then force-closes that window.
See also: Activate(), CloseWindow(), Dimensions(),
GetWindow(), KillProcess(), Maximize(),
Minimize(), Restore(), WindowOnTop(),
WinMove()
Launch()
- Launch(Item/Command)
- Open practically anything: a program, document, folder, shortcut, shell location or command line.
- Plain
Launch()commands drop to ordinary user rights when KeyBind is running elevated. - To run a program elevated (run as Admin) prefix the command with
>, e.g.Launch(>regedit.exe). - To employ the "ShellExecute" mechanism, use a pipe character as your first character. See HowTo for more details.
- ShellExecute extras: further pipes add parameters, then a verb. Leave the verb empty for the usual open.
- @ExitValue: Number. The new process ID.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\notes.txt|Notes - @Date\n)**Launch(notepad.exe @Desktop\notes.txt)- writes notes to your desktop and opens them in Notepad.FileWriteData(@Desktop\notes.txt|Notes\n)**Launch(|@Desktop\notes.txt)- opens the desktop file in its default editor, using ShellExecute.Launch(|shell:ChangeRemoveProgramsFolder)- opens the Add/Remove Programs Control Panel using ShellExecuteFileWriteData(@Desktop\notes.txt|Notes\n)**Launch(|notepad.exe|@Desktop\notes.txt)- opens the desktop file in Notepad with its path as a parameter.FileWriteData(@Desktop\report.txt|Print me\n)**Confirm(Print report.txt?|Sends one page to your default printer.)**If(@ExitValue|Yes)**Launch(|@Desktop\report.txt||print)**EndIf()- prints the desktop file with its default app, after asking.Launch(|@MyDocuments)- opens your Documents folder without hard-coding the user name.VarAssign(project|@Desktop)**VarSave(project)**VarLoad(project)**Launch(|@project)**MessageBox(Opened|Your desktop opened from the remembered location.)- opens a file location stored in a user variable.Input(Open Something|Enter a path or web address|target)**Launch(|@target)- asks what to open at run time.
See also: Execute(), HttpGET(), HttpPOST(), Url()
ListView()
- ListView(List[|Title])
- Opens a resizable list viewer with a filter at the top and Copy, Paste, Line Feeds and Close controls at the bottom. The title defaults to
List Viewer. Further commands in your Task continue after the window opens. Every call opens an independent window, including calls in the same Task. - Supply the command with literal text,
@Clipboard,@Selected, a user variable,@ExplorerSelection, orfile:path. File paths accept @Macros. - An empty argument, e.g.
ListView()opens an empty viewer (which accepts drag and drop of files and folder) in the last saved position. Subfolders are not scanned when you drag a folder into aListView(). - In File list mode, you get a "Modified" column you can sort with, as well as extra controls to launch.
- Double-click any item (or press enter) to launch the selected item or items in their default app.
- Dropping unreadable sources leave the previous contents intact and show a notification. A dropped files use the same first-nonempty-row test for file-list mode as
- Each nonempty line becomes a row. LF, CRLF and CR separate rows. Spaces and duplicate lines are preserved; empty lines and the empty entry after a final line break are omitted. The Line column shows the original source line number, so omitted blank lines can leave gaps.
- In literal command text,
\nand\rcreate line breaks and\\gives a literal backslash. Clipboard, selected text, variables, files and Explorer paths retain their backslashes. Use a variable or file for a line containing|; the first pipe in the command separates the source from the title. - The viewer captures its contents when the command runs. With Live Update deselected, later source changes do not change the open list. An unreadable source stops that task without opening a window; existing viewers remain intact.
- For clipboard sources, file sources and user variables populated by
FileList()in the same executing task, aLive Updatecheckbox appears besideOn Top. The FileList variable is identified by an internal Boolean@@FILE@@signal which ends with the task and is never saved. The checkbox starts deselected; an open viewer retains the checkbox after the task ends. When checked, clipboard and file-text sources are re-read every 500 milliseconds. A FileList viewer retains the original folder, wildcard, recursion and full-path options in memory and uses Windows folder-change notifications. Enabling Live Update creates the watcher before an initial catch-up scan; later notifications rebuild the file list on the next event-service pass. Unchanged folders are not repeatedly scanned. Recursive lists watch subfolders too. If Windows cannot create or maintain the watcher, it retries and scans once per second. Updated rows and the displayed row count reflect additions, removals and renames, including changes in letter case; the original user variable is not rewritten. An empty matching list clears the rows. An unavailable source retains the displayed data until a later retry succeeds. Disabling Live Update or closing the viewer releases its watcher. Source parameters are retained only by that open viewer and are never saved. Notify on changesappears besideLive Updatefor live-capable sources. It inherits the saved globallistview_notifypreference when opened, and remains disabled until Live Update is checked. The Config Editor shows a ListView: label with Notify on changes beside it, after the four-pixel gap. Update alerts and the three timing controls are below that row. Switching it off disables both selector labels and the On, Off and Repeat controls; their values are retained. When both are checked, a changed source uses the method selected byUpdate alerts:in the Config Editor'sSounds and Alertsgroup. Click either touching label to cycleTooltip,Flash,Tooltip+Flash,Full FlashandTooltip+Full Flash; the choice is saved aslistview_notify_typein[KeyBind]and defaults to Tooltip+Flash. Flash useswarning_coloron added or changed text occurrences only; unchanged entries retain their color even when their row position moves. Extra duplicate occurrences flash. Removed entries have no remaining row to flash. Full Flash colors the entire list, including an empty list.listview_notify_ontime=150andlistview_notify_offtime=50set milliseconds per on/off phase;listview_notify_repeat=3sets the number of cycles. The On, Off and Repeat numeric controls directly below the alert selector save these preferences and apply them immediately. A further source change restarts the flash sequence. Tooltip displaysList changed: <viewer title>for two seconds; paired modes combine it with the selected flash scope. Flash timing uses an Adlib callback while alerts are active. Every on/off phase paints immediately and starts its own timer; main-loop delays cannot skip phases. Flash does not pause task processing. The separate failed-launch row flash remains 500 milliseconds. Unchanged source text, filter edits and sorting do not trigger a notification. Disabling Live Update disables the notification control while retaining its check state. Changing Notify on changes in the Config Editor or any viewer saves the global preference and synchronizes all open viewers. Switching it off cancels active flashes. Filters and sorting apply to refreshed rows. Ordinary variables, literal text, selected text and Explorer selection do not get live controls.- Type a case-insensitive substring into the filter to show matching Text rows. Clear the filter to show all rows. Selected rows that remain visible stay selected; rows hidden by filtering are excluded from Copy and Paste and are not automatically reselected when the filter is cleared.
- File launching is available for directory results supplied by a
FileList()variable, and for afile:text source whose first nonempty row names an existing file rather than a directory. The text-file check uses the row as written; it does not infer file-list mode merely because the source itself is a file. Empty files and text files whose first nonempty row is ordinary text, an unavailable path, a wildcard pattern or a directory remain text viewers. In a file-list viewer, double-click a single selected row to open that file in its default application; a failed launch flashes the row. With the list focused, Enter opens all selected files in displayed order. For more than 12 selected files, an OK/Cancel box asksReally open X items?, with X replaced by the selected count. Cancel opens none of those files. Up to 12 files open without confirmation. Enter works with Auto-launch on selection checked or unchecked; text-only viewers do not open rows. Hovering a file-list viewer shows one multi-line launch reminder that stays at its initial hover position until the pointer leaves the list or the viewer loses focus. Text viewers do not launch rows on selection or double-click and do not show that reminder; filtering, Copy, Paste and Live Update remain available as appropriate for the source. In file-list viewers anAuto-launch on selectioncheckbox appears besideNotify on changes. It inherits the saved globallistview_liveviewpreference in[KeyBind]. When checked, selecting one row with the mouse or Up/Down opens it at once, with no double-click. New files select themselves, so they open on arrival and on viewer load. - Click Line or Content to sort; clicking the same header again reverses its order. Directory results supplied by
FileList()also have a Modified column between Line and Content, showing each file's last-modified local date and time as YYYY-MM-DD HH:MM:SS. Click Modified to sort oldest first, then click again for newest first. Up/Down selects rows in the displayed order, including date order. Lists read from text files do not have a Modified column, even when their rows contain file paths. Unavailable dates appear blank. Live Update refreshes dates after directory change notifications even when the filenames have not changed. Ctrl-click and Shift-click select multiple rows. Line and Modified size to their contents; Content sizes to its contents and fills spare window width. Horizontal and vertical scrollbars appear when needed. Long lines are not shortened in the stored list. Copy, Paste and Close have hover tips describing their actions. - Copy writes the selected complete lines to the clipboard and leaves the viewer focused. Paste activates the last external application window, waits up to one second for activation, writes the selected text to the clipboard and sends Ctrl+V. It leaves the viewer open. If the destination has closed or activation fails, the clipboard is unchanged and no paste is sent. KeyBind's own windows are excluded as Paste destinations.
- Both buttons join selected lines in their original source order, regardless of the displayed sort order, without adding a final line break. They are disabled when nothing is selected. Paste is also disabled while Auto-launch on selection is checked; unchecking Auto-launch enables Paste again when rows are selected. Copy remains available with Auto-launch enabled.
- The Line Feeds dropdown chooses LF, CRLF or CR for separators inserted by Copy and Paste. Each window starts with the
line_feedpreference and keeps its own choice. Changing this dropdown does not save the preference or change other windows. See Line Feeds for the global default. - Close, Escape and the window close button close only that viewer. The shared
List Viewerposition and size are remembered; contents, filters and selections are not saved. Mouse hooks remain suspended while any ListView, clipboard slots or History viewer is open. Running tasks and their dialogs share the same suspension mechanism. - @ExitValue: The new window handle on success; false if the source cannot be read or the window cannot be created.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindListView(red\ngreen\nblue|Colours)- opens three selectable rows. Select red and blue, then Copy; the clipboard contains those two lines.ListView(@ClipBoard|ClipBoard Contents:)- Only works if you have some lines in your clipboard!Copy(first\nsecond\nthird)**ListView(@Clipboard|Clipboard lines)- creates clipboard text and opens it as a list.Copy(Monday\nTuesday\nWednesday)**Assign(listview_days|@Clipboard)**ListView(@listview_days|Days)- stores actual line breaks in a variable and opens its three entries.Assign(listview_demo|@Desktop\KeyBind-ListView-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FolderCreate(@listview_demo)**FileWriteData(@listview_demo\jobs.txt|red\ngreen\nblue\n)**ListView(file:@listview_demo\jobs.txt|A list read from a file)- creates the source file before opening its three rows.Assign(listview_demo|@Desktop\KeyBind-ListView-Files-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FolderCreate(@listview_demo)**FileWriteData(@listview_demo\one.txt|First example file.)**FileWriteData(@listview_demo\two.txt|Second example file.)**MessageBox(Two files created|one.txt and two.txt were created in:\n@listview_demo\n\nThe list viewer will show their full paths.)**FileList(@listview_demo|*.txt|fullpaths|listview_files)**ListView(@listview_files|Two files ready to copy)- creates two actual files, confirms their location and opens both full paths for selection and copying.ListView(@ExplorerSelection|Selected files)- save this as a .kc script or assign a HotKey first; select files or folders in Explorer, then run it from that HotKey or the tray. Each selected path becomes a row.FileList(@Desktop||recurse;fullpaths|MyPaths)**ListView(@MyPaths|Desktop paths)- lists full paths, then shows them in aListView()which fills the left side of your desktop's working area. Note use of @ExitValue to capture theListView()'s handle, for exact window matching.Assign(listview_demo|@Desktop\KeyBind-ListView-Launch-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FolderCreate(@listview_demo)**FileWriteData(@listview_demo\one.txt|First launch file.)**FileWriteData(@listview_demo\two.txt|Second launch file.)**FileList(@listview_demo|*.txt|fullpaths|listview_launch)**ListView(@listview_launch|Two files ready to launch)- opens two file paths; checkAuto-launch on selectionand Up/Down or click opens each file at once.ListView(red\ngreen\nblue|Colours)**ListView(first\nsecond\nthird|Positions)- opens two independent viewers together. Each keeps its own filter, selected lines and line-feed choice. [TODO: separate x/y + size]FileOpenDialog(Choose a list file|@Documents|Text (*.txt);All (*)|3)**ListView(file:@ExitValue|Chosen list file)- reads the chosen text file into selectable rows for filtering, copying and pasting. If its first nonempty row names an existing file, the viewer also enables file launching. Cancelling the picker stops the task; the chosen text file is not modified.Copy()**ListView(@ClipBoard|Selected text lines)- assign a HotKey or save a .kc script first, select lines in another application, then run it to copy the selection and open its lines for filtering and copying.
file: sources, and have no Modified column. Dropped folders support directory Live Update without creating a user variable.
See also: @ExplorerSelection, ClipBoardSlots(), FileList(), ForEach()
LockPC()
LockPC()- Lock the Windows workstation.
LockWorkStation()is an alias ofLockPC().- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Lock this PC?|Windows locks and asks for your sign-in.)**If(@ExitValue|Yes)**LockPC()**EndIf()- asks first, then locks only on Yes.
See also: SystemHibernate(), SystemSleep()
LockWorkStation()
Alias of LockPC()
Mag()
HotKey: Ctrl+Win+Alt+M
- Mag([oneshot/on/off/toggle])
- Open KeyBind's magnifier and colour picker, ready to inspect any pixel on the screen.
MagPicker()is an alias ofMag().Mag()andMag(oneshot)wait for one left click, then close the picker. Copy colors enables clipboard output. Create Color Report adds the full report to the configured destination; with Copy colors off, reports can be written to file but do not replace the clipboard. These modes do not create a ClipBoard slot.Mag(on)keeps the picker running and immediately continues later commands. With Copy colors enabled, the first left click replaces the clipboard with the sampled colour and starts a fresh collection; each subsequent click adds a new ClipBoard slot. Samples use the selected colour format and prefix setting. Repeated clicks on the same colour create separate slots. With Copy colors disabled, neither the clipboard nor the slots are changed; optional file reports can continue. The first copied capture replaces any previous clipboard pile and slots. The pile is rebuilt after each later capture, and the oldest entries are removed when the configured maximum is reached. Repeated on commands do not restart the collection.Mag(off)stops the picker without taking another sample.Mag(toggle)starts or stops persistent capture, so one HotKey can do both. RepeatedMag(on)keeps the existing picker.Mag(oneshot)switches a running persistent picker to a single selection; the next click uses one-shot clipboard/report behaviour and closes it. Captured slots remain available after stopping. The mode is not saved across KeyBind restarts.- For an appended Color Report file entry on every persistent click, enable both Create Color Report and Save color report to file. Copy colors independently controls whether the same clicks also create slots. The report includes all colour conversions and, when enabled, the clicked window's title, position, size and mouse coordinates captured at click time. In persistent mode, reports append without opening or bringing the report to the front. When capture stops with
Mag(off)or a toggle to off, Open report on sample opens the report once, provided that capture successfully wrote a file entry. With that preference off, stopping does not open it. One-shot mode follows the preference immediately after its selection. Reports do not replace the collected slot pile in persistent mode; disabling file output leaves the slots available without copying a full report over them. - Set the colour format, clipboard and report preferences in Options or the tray menu, or use
SwitchColorFormat(),CopyColor(),ColorReport()andKeyBind(). Starting Mag stops the Dimensions picker. Persistent capture allows KeyBind's other commands and server work to continue. - @ExitValue: True when the picker starts or stops successfully, or a one-shot selection finishes; False for an invalid mode or unavailable mouse hook.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMag()- pick one colour using the current clipboard/report preferences.Mag(oneshot)- explicitly select one-shot mode, including from a running persistent picker.Mag(on)- start a fresh clipboard collection with the first copied colour, then add a new slot per click.Mag(off)- stop collecting without taking another sample.Mag(toggle)- start or stop persistent capture.MagPicker(on)- start persistent capture through the alias.Mag(off)**ClipBoardSlots()- stop and inspect the collected colours in the slots viewer.Mag(off)**PasteSlot(1-3)- stop and paste slots 1 to 3 into the active input. Collect at least three slots first; these numbers refer to the current collection, after any trimming at the slot limit.CopyColor(on)**ColorReport(on)**KeyBind(color_report_to_file|on)**Mag(on)- collect colour slots and append a full report for each click without opening the report file during capture. Stopping opens it once if Open report on sample is enabled. These report settings are saved.CopyColor(on)**ColorReport(off)**Mag(on)- collect colour slots without generating full reports; saves Copy colors as on and Create Color Report as off.CopyColor(off)**ColorReport(on)**KeyBind(color_report_to_file|on)**Mag(on)- append a Color Report entry per click without changing the clipboard or creating slots. These settings are saved.Mag()**MessageBox(Colour picked|@ClipBoard)- picks a colour and displays the copied value.Mag()**Paste()- picks a colour and pastes its value.Mag()**FileAppendData(@Desktop\palette.txt|@ClipBoard\n)- picks a colour and adds it to a palette file.
See also: ClipBoardSlots(), ColorReport(),
CopyColor(), Dimensions(), PasteSlot(), SwitchColorFormat()
MagPicker()
Alias of Mag()
Mail()
Alias of SendMail()
Maximize()
- Maximize([Window])
- Maximize a matching window, or the active window when left empty.
- See window matching in
Activate(). - The following window control commands will set the KeyBind's internal 'last used window' flag, so any of these commands can be used later in your task without specifying the window:
Activate(),Minimize(),Maximize(),Restore(),WindowOnTop()orSetTransparency(). - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMaximize()- maximizes the active window.Maximize(Untitled - Notepad)- maximizes Notepad.
See also: Activate(), CloseWindow(), Dimensions(),
GetWindow(), KillWindow(), Minimize(),
Restore(), SetTransparency(), WindowOnTop(), WinMove()
Menu()
HotKey: Ctrl+Win+Alt+left-click
- Menu(Name|Action...)
- Show a custom menu at the mouse position.
- Give each item a visible name followed by its action. Add as many name|action pairs as you need.
- Use a lone
-to add a separator between items. - An action can be a KeyBind command, a
**chain of commands, or the path to a.kcscript. - For scripters:
|separates names and actions;-is a complete menu entry by itself. A|inside a command's parentheses stays inside that command. The item limit is roughly one per 24 pixels of screen height, and the entireMenu()command is limited to 32,768 characters (32KB). - Install the sample hotkeys to get BlobDrop's big Admin Menu on Ctrl+Win+Alt+Click.
- @ExitValue: Value. The chosen command's result, or False.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMenu(Event Viewer|Launch(|eventvwr.msc)|Services|Launch(|services.msc)|Device Manager|Launch(|devmgmt.msc))- three Windows admin tools.Menu(Lock PC|LockPC()|Screen off and lock|Screen(off)**LockPC()|Open KeyBind data|OpenDataDir())- a single command, a command chain and another useful shortcut.Menu(Mouse Settings|Launch(control mouse)|-|Control Panel|Launch(control))- a separator between two items.Menu(Run control script|@DataDir\Scripts\control.kc|Show hotkeys|ShowHotKeys())- one item runs a.kcscript.Menu(Event Viewer|Launch(|eventvwr.msc)|Services|Launch(|services.msc)|Device Manager|Launch(|devmgmt.msc))
See also: NewHotKey(), ShowHotKeys()
MessageBox()
- MessageBox(Title[|Message|X|Y|Timeout|On Top])
- Similar to
InfoBox(). Shows a small window with your title and message. The main differences beingMessageBox()has an OK button and waits for you to press it unless you set a timeout, and it does not save title or messages to your ini. MsgBox()is an alias ofMessageBox().- See
InfoBox()for full details of all the parameters. - MessageBox remembers its window position, but does not save its title or message.
- Click anywhere in a message box to drag it around the desktop.
- @ExitValue: A number: 1 = OK, 2 = clicked "x", -1 = dialog timed out
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMessageBox(Backup complete)- uses the title as the message.MessageBox(Backup complete|Your backup is ready|200|150)- opens at X 200, Y 150.MessageBox(Backup complete|-|-|-|10s|on)- uses the title as the message, stays on top and closes after 10 seconds.FileWriteData(@Desktop\latest-backup.txt|backup contents - @Time\n)**FileSize(@Desktop\latest-backup.txt|KB)**MessageBox(Backup complete|Backup size: @ExitValue KB|-|-|10s)- displays a real result and closes automatically.FileWriteData(@Desktop\status.txt|All systems go - @Time\n)**FileReadData(@Desktop\status.txt|status)**MessageBox(Current status|@status)- displays data read from a desktop file.
See also: InfoBox(), ProgressBar()
Minimize()
- Minimize([Window])
- Minimize a matching window, or the active window when no "catcher" is supplied.
- See window matching in
Activate()for how to cinstruct such a "catcher". - The following window control commands will set the KeyBind's internal 'last used window' flag, so any of these commands can be used later in your task without specifying the window:
Activate(),Minimize(),Maximize(),Restore(),WindowOnTop()orSetTransparency(). - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMinimize()- minimizes the active window.Minimize(Untitled - Notepad)- minimizes Notepad.Minimize()**Pause(2s)**Restore()- minimizes the active window, waits two seconds, then brings back the same window.Minimize(Google Chrome)**Pause(2s)**Restore(Google Chrome)- minimizes this browser, waits two seconds, then brings it back again.Activate(<REGEXPTITLE:(?i)(.*Edge.*|.*- Google Chrome|.*Mozilla Firefox.*|.*- Brave.*)>|3s)**Assign(win|@ExitValue)**Minimize(@win)**Pause(2s)**Restore(@win)- finds any major browser, minimizes it, waits 2s then restores that exact window.
See also: Activate(), CloseWindow(), Dimensions(),
GetWindow(), KillWindow(), Maximize(),
Restore(), SetTransparency(), WindowOnTop(), WinMove()
MouseClick()
- MouseClick(X|Y[|absolute/relative/window|Speed|right/left/middle/main/menu/primary/secondary|Clicks])
- Click at a screen position, from the current pointer position, or from the foreground window's top-left corner.
Click()is an alias ofMouseClick().- With window positioning, KeyBind checks the active window against the last
Activate(), restores focus if it changed, and stops the task if the window is gone. - @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMouseClick(100|200)MouseClick(@DesktopWidth/2|@DesktopHeight/2|absolute|10|left|2)- double-clicks the centre of the desktop.MouseClick(100|50|window|5)- clicks 100 pixels right and 50 pixels down from the foreground window's top-left corner.
See also: ClickDrag(), DoubleClick(), MouseMove()
MouseDown()
- MouseDown(right/left/middle/main/menu/primary/secondary)
- Hold a mouse button down until a later
MouseUp(). - @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMouseDown(left)MouseDown(left)**MouseMove(300|0|relative|10)**MouseUp(left)- drags the current item 300 pixels to the right.
See also: ClickDrag(), MouseUp()
MouseMove()
- MouseMove(X|Y[|absolute/relative/window|Speed])
- Move the pointer to an absolute screen position, relative to the current pointer position, or calculated the top-left corner of the foreground window.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMouseMove(100|0|relative|5)MouseMove(@DesktopWidth/2|@DesktopHeight/2|absolute|10)- moves to the centre of the desktop.MouseMove(100|50|window|5)- moves 100 pixels right and 50 pixels down from the foreground window's top-left corner.
See also: ClickDrag(), MouseClick()
MouseUp()
- MouseUp(right/left/middle/main/menu/primary/secondary)
- Release a mouse button held by
MouseDown(). - @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMouseUp(left)MouseDown(left)**Pause(1s)**MouseUp(left)- holds the left button for one second.
See also: ClickDrag(), MouseDown()
MouseWheel()
- MouseWheel(up/down|Notches[|Pause])
- Scroll the mouse wheel up or down as much, and as quickly, as you like.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMouseWheel(up|3)MouseWheel(down|1)MouseWheel(up|5|50)- five notches, 50ms apart.
See also: Record(), {WheelUp} / {WheelDown}
MsgBox()
Alias of MessageBox()
NewHotKey()
- NewHotKey([Global/App|Keys|Task])
- Creates a new HotKey, either using a wizard, or with parameters supplied inside the command. Once saved, the HotKey is immediately live.
- All parameters are optional. Supply all three and the HotKey is created with no dialogs. Omit anything and you get that dialog.
- Cancelling any step saves nothing. If there are any clashes or conflicts with your supplied parameters, you get a dialog for those, instead.
- Tip: You can use your
RunSelected()HotKey to create any HotKey by simple selecting a validNewHotKey()command and running it. Instant HotKey! - @ExitValue: Text. The new HotKey (e.g. ^!#{h}), or False.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindNewHotKey()**MessageBox(HotKey created|Press your new HotKey to test it.)- opens the wizard blank, then confirms what was made.NewHotKey(Global|^!#h|NewHotKey())- creates a Global HotKey, Ctrl+Alt+Win+H, which opens theNewHotKey()wizard again when pressed.NewHotKey(Global|^!p|Speak(Hello from KeyBind!))**MessageBox(Press Ctrl+Alt+P|Your new HotKey speaks when pressed.)- creates a Global HotKey which speaks a greeting, then tells you how to test it.
See also: HotKeyControl(), Menu(), ShowHotKeys()
NewSchedule()
- NewSchedule([Name|frequency=..|date=..|time=..|repeat=..|task=..|skip_apps=..|enabled=..])
- Create a new schedule with a wizard: name, frequency, date and time, repeat, task, skip list, then enabled. Supplied parameters skip their dialogs; cancel at any step saves nothing.
- @ExitValue: Text. The new schedule's name, or False.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindNewSchedule()**MessageBox(Schedule created|Check the Schedules tab to see it.)- walks the wizard blank, then tells you where to look.NewSchedule(Morning|frequency=Daily|time=9:00am|enabled=true|task=Text(Good morning!))**MessageBox(Morning live|Your new schedule speaks at nine.)- creates a daily schedule with no user interaction.NewSchedule(NightlyDocsMirror|frequency=Daily|time=2:00am|skip_apps=|enabled=true|task=FolderSync(C:\Users\Dad\Documents|L:\[MIRROR]\Dad\Documents))- setup a schedule to run a nightly folder sync of my documents
See also: ScheduleControl(), Schedules()
NewSentinel()
HotKey: Ctrl+Win+Alt+S
- NewSentinel([Name|Folder|Rate|Ignore|Groups on/off|Task])
- Creates a new file or folder Sentinel.
- All parameters are optional. If you supply Name, Folder and Task, the Sentinel is created with no user interaction. Otherwise, you get a dialog, with any values you supplied pre-filled.
- Drag your file or folder into the Folder/File path input. The dialog detects whether it is a file or folder, selects the matching Type, and updates the path label, browse button and available controls automatically. Folder mode shows file-type groups, Standard groups and Ignore; File mode shows Link Sentinel instead. If you drop several items, only the first is used. The dropped item must be an existing file or folder; click OK to create the Sentinel.
- Groups on/off controls inclusion of the standard file-type groups; it does not set the Sentinel enabled state.
- For scripters: a name that is already taken fails the command and saves nothing. A folder that does not exist yet creates the Sentinel in a disabled state.
- @ExitValue: Text. The new Sentinel's name, or False.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindNewSentinel()**MessageBox(Sentinel created|Drop a file in its folder to test it.)- opens the New Sentinel wizard, then tells you how to test the result.FolderCreate(@Desktop\Sentinel-inbox)**FolderCreate(@Desktop\Sentinel-sorted)**NewSentinel(Inbox|@Desktop\Sentinel-inbox|3|tmp,bak|on|Ignore()**MoveTo(@Desktop\Sentinel-sorted))**MessageBox(Inbox live|Drop a file on your desktop Sentinel-inbox folder to test.)- builds real folders, creates the Inbox Sentinel with standard file-type groups.
See also: Ignore(), MoveTo(), OpenWith(), Rename(),
Sentinel(), SentinelControl()
NewTrigger()
HotKey: Ctrl+Win+Alt+N
NewTrigger()- Create a new Window, System or ClipBoard Trigger using a wizard (three dialogs). Once saved, the trigger is immediately avaialable for use.
- For scripters: cancelling any step stops the command and saves nothing.
- @ExitValue: Text. The new trigger, or False.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindNewTrigger()**MessageBox(Trigger created|Try the action that fires it.)- walks you through the three dialogs, switches the finished trigger on, then tells you how to test it.
See also: ReloadWindowTriggers(), Triggers()
Num2Words()
- Num2Words(Number)
- Translate whole numbers into English words.
- @ExitValue: the translated words
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindWordCount(the quick brown fox jumps over the lazy dog)**Num2Words(@ExitValue)**MessageBox(Words|The phrase contains @ExitValue words)
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), Cut(), CutAppend(),
DeDupeLines(), FileLineCount(), FindReplace(),
Paste(), PastePlainText(), PasteSlot(),
SortLines(), WordCount()
OnTop()
Alias of WindowOnTop()
OpenDataDir()
HotKey: Ctrl+Win+Alt+O
OpenDataDir()- Open KeyBind's user data folder in Explorer.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindOpenDataDir()OpenDataDir()**Pause(1s)**ShowHotKeys()- opens the data folder, then shows the HotKeys available in Explorer.
See also: ConfigEditor(), EditIniFile(),
OpenTempDir()
OpenSentinelFolder()
- OpenSentinelFolder([Names/all])
- Open one or more Sentinel folders in Explorer.
- For a file Sentinel, this opens the folder containing its watched file.
- @ExitValue: True or false. Whether a folder opened.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindOpenSentinelFolder()- opens all Sentinel folders.OpenSentinelFolder(Inbox|Downloads)- opens just those two folders.OpenSentinelFolder(all)- opens all Sentinel folders.Sentinel(on)**OpenSentinelFolder()- starts watching and opens all Sentinel folders.
See also: MoveTo(), OpenTargetDir(), Sentinel()
OpenTempDir()
OpenTempDir()- Open KeyBind's temporary folder in Explorer.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindOpenTempDir()
See also: OpenDataDir()
OpticalTrayClose()
Alias of CDTrayClose()
OpticalTrayOpen()
Alias of CDTrayOpen()
Options()
Options()- Open KeyBind's Options page in your browser. This is basically a web version of KeyBind's Config Editor, using KeyBind's server to handle the commands the page sends (and receives).
- Like the Config Editor, all changes apply live. A persistent server-sent event connexion delivers any saved preference and authorized-app changes automatically, without polling or periodic browser requests. Windows directory notifications (messages) detect writes to your ini files, including manual edits.
- The sttings "cards" can be re-ordered, just like Config Editor, so your most-used settings can go at the top, or whatever. This order will be remembered.
- At the bottom-left of each card is a small cog which appears when you hover your pointer there. Click that for a slider where you can adjust the width the card. This also will be remembered.
- A larger cog at the bottom-left of the Options page appears when you hover over it or focus it with the keyboard. Here you can set the page scale, which will also be remembered for future
Options(). - "Secure" settings (i.e. password-related) are only available if you run the server in Secure mode (token and origin checking enabled).
- @ExitValue: the HTML file path when the browser launch succeeds; False on installation, listener, registration or browser launch failure.
- Examples:
Options()- Open the web Options page.
See also: AppUsage(), KeyBind(), Report().
Paste()
Paste()- Paste the current clipboard contents into the active app.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(Pasted by KeyBind at @Time)**Paste()**MessageBox(Pasted|The line above landed in Notepad.)- loads the clipboard and pastes it into Notepad.FileWriteData(@Desktop\reply.txt|Thanks - replying at @Time.\n)**FileReadData(@Desktop\reply.txt|reply)**Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(@reply)**Paste()- reads a prepared reply from your desktop and pastes it into Notepad.
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), Cut(), CutAppend(),
DeDupeLines(), FindReplace(), Num2Words(),
PastePlainText(), PasteSlot(), SortLines(),
WordCount()
PastePlainText()
PastePlainText()- Paste the clipboard as plain text, dropping fonts, colours and links. The stripped text stays on the clipboard, so the next paste matches what you just pasted.
- If the clipboard is empty or holds something that is not text, you just get a regular paste.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(Plain demo - pasted without styling)**PastePlainText()**MessageBox(Pasted plain|Stripped of fonts and colours.)- pastes the clipboard as unformatted text into Notepad.
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), Cut(), CutAppend(),
DeDupeLines(), FindReplace(), Num2Words(),
Paste(), PasteSlot(), SortLines(),
WordCount()
PasteSlot()
- PasteSlot([Slot|Range|List])
- Paste one clipboard slot, several slots (1,4,6) or a joined range (2-6, 5-, -7); forms mix freely (1-3,5). Slots which no longer exist are skipped. When supplied with no parameters, it invokes
ClipBoardSlots() - Slot numbers address the live collection, which trims at the slot limit. (DO NOT EDIT!) the example below: its numbers depend on its own
Copy()commands. - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(Slot demo - first line)**Copy(Slot demo - second line)**PasteSlot()**MessageBox(Pick a slot|The viewer above lists your slots - pick one to paste.)- stacks two clippings, opens the slot viewer in Notepad.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(Slot demo - first line)**Copy(Slot demo - second line)**PasteSlot(2)**MessageBox(Pasted slot 2|Check Notepad for the second clipping.)- stacks two clippings, pastes slot 2 into Notepad.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(one)**Copy(two)**Copy(three)**PasteSlot(2-4)**MessageBox(Pasted 2 to 4|Slots joined into Notepad.)- stacks three clippings, pastes the range joined.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(one)**Copy(two)**Copy(three)**Copy(four)**PasteSlot(1,4,6)**MessageBox(Pasted 1 and 4|Slot 6 is missing, so it is skipped.)- stacks four clippings; slot 6 does not exist, so only slots 1 and 4 paste, joined.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Copy(one)**Copy(two)**Copy(three)**Copy(four)**Copy(five)**PasteSlot(1-3,5)**MessageBox(Pasted 1, 2, 3 and 5|Ranges and lists mix freely.)- stacks five clippings, pastes slots 1 to 3 plus slot 5, joined.
See also: ChangeCase(), ClearSlots(), ClipBoardSlots(),
Copy(), CopyAppend(), Cut(),
CutAppend(), DeDupeLines(), FindReplace(),
Num2Words(), Paste(), PastePlainText(),
SortLines(),
WordCount()
Pause()
- Pause(Duration[|blocking])
- Wait for a time, then carry on with the rest of the Task.
- Set the optional 2nd parameter to true to induce "blocking" behaviour; used when you need to ensure things do not change. Usually you won't need this.
When Sleep/Pause is blocking, the following events are not processed:
- Countdown display updates, full/mini switching, completion Tasks and queued countdown controls.
- Scheduled tasks.
- Window triggers, queued
Wait()s and their timeout checks. - System, idle, network, process, Bluetooth, display, audio and Wi-Fi triggers.
- Clipboard-trigger processing, file sentinels and externally submitted tasks.
- Queued mouse-click and wheel actions.
- Periodic updates for Run History, ClipSlots, list viewers, About and system information, etc..
- Folder-sync progress.
Sleep()is an alias ofPause().- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindInfoBox(Watch this space...)**Pause(2s)**InfoBox(Pause over|Two seconds passed.)- shows a box, waits, then shows the next one.Text(Starting...)**Pause(2s)**Text(done.)- leaves a visible two-second gap between two actions.PlaySound(C:\Windows\Media\chimes.wav)**Pause(500ms)**Beep(1200|100ms)**MessageBox(Finished|Chime plus beep - hear both layers.)- spaces two audible alerts, then confirms.
See also: KeyDelay(), Wait()
PlaySound()
- PlaySound(File[|wait])
- Play an audio file (WAV or MP3), either in the background or all the way through before the task continues.
- @ExitValue: Empty.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindPlaySound(C:\Windows\Media\chimes.wav)- plays a built-in Windows chime in the background.PlaySound(C:\Windows\Media\chimes.wav|wait)**MessageBox(The sound has finished.)- waits for playback before continuing.
See also: Beep(), SetVolume(), Silence(),
StopAudio()
ProgressBar()
- ProgressBar(Title[|Message|Subtext|X|Y|Options]/Percent/off/close)
- Show a simple progress window, update its percentage, or close it.
- To show it, supply a title and main message. Optionally, add subtext, X/Y position, and display options. Use
-for a saved X or Y position; explicit positions are saved for later use. - Options:
plain(1),notop(2), andmove(16). Combine names or numbers with+, such asplain+notop,1+16, or17. - Use an integer on its own to set progress (0-100); use
offorcloseto close the window. - @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindProgressBar(Export|Preparing files|Please wait|20|80)**Pause(1s)**ProgressBar(50)**Pause(1s)**ProgressBar(off)**MessageBox(Done|Watched it fill to 50%, then closed.)- shows the bar, fills it halfway, then closes it.ProgressBar(Export|Writing files|Please wait|20|80|plain+notop)- plain (borderless, titleless style + no on-top flag set).ProgressBar(Export|Writing files|-|-|-|move)- recalls the saved position, creates a moveable progress bar.ProgressBar(Export|Copying files|Please wait|-|-)**Pause(1s)**ProgressBar(50)**Pause(1s)**ProgressBar(100)**Pause(1s)**ProgressBar(off)- shows the bar, sets the value a couple times, then closes it.ProgressBar(off)close the progress bar.
See also: InfoBox(), MessageBox()
Quit()
HotKey: Ctrl+Win+Alt+Q
Quit()- Close KeyBind, running the configured shutdown task first.
- @ExitValue: Empty. KeyBind quits.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Quit KeyBind?|KeyBind closes and your HotKeys stop working.)**If(@ExitValue|Yes)**Quit()**EndIf()- asks first, then quits only on Yes.
Record()
HotKey: Ctrl+Win+Alt+F9
- Record([File[|Append]])
- Start recording your actions (typing, clicks, wheel scrolls, drags, window switches, etc.) as a .kc script.
- You can also start or stop recording with the Record hotkey (default:
Ctrl+Win+Alt+F9) or the tray menu. Set the hotkey with Config Editor → Record HotKey. Other triggers pause while you record; your HotKeys keep working. - When recording stops, either the Recording Editor opens (when enabled) with the supplied path as its suggested save path, or (when Editor is disabled) the script is saved immediately to the specified path. If you disable the Editor and don't supply a path, you'll get a file save dialog.
- Append to the file instead of overwriting it with a true second parameter, e.g.
Record(C:\Temp\job.kc|true)- the new recording follows a blank separator line.-in place of the path means choose at save time. The editor Save button always overwrites. - @ExitValue: True or false; whether or not recording started.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindRecord(@Desktop\my-new-job.kc)**MessageBox(Recording|Perform some actions, then run StopRecording(). With editing enabled, choose Save File in the Recording Editor to write my-new-job.kc on your desktop.)- supplies a suggested destination for the recording editor.
See also: RecorderControl(), StopRecording()
RecorderControl()
See RecorderControl() under *Control().
Recycle()
- Recycle(File Or Folder)
- Send a file or folder to the Recycle Bin.
- You can use
*and?wildcards; there is no second parameter. - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\KeyBind-demo-recycle-me.txt|KeyBind created this file to show Recycle() working.\n)**MessageBox(Created|See KeyBind-demo-recycle-me.txt on your desktop - recycling now.)**Recycle(@Desktop\KeyBind-demo-recycle-me.txt)**MessageBox(Recycled|Find it in your Recycle Bin.)- creates a demo file, then sends it to the Recycle Bin.FolderCreate(@Desktop\KeyBind-demo-old-folder)**FileWriteData(@Desktop\KeyBind-demo-old-folder\inside.txt|contents\n)**Recycle(@Desktop\KeyBind-demo-old-folder)**MessageBox(Recycled|Folder and contents went to the Recycle Bin.)- recycles a demo folder and its contents.FileWriteData(@Desktop\KeyBind-demo-a.log|a\n)**FileWriteData(@Desktop\KeyBind-demo-b.log|b\n)**MessageBox(Created|Two KeyBind-demo log files on your desktop - recycling now.)**Recycle(@Desktop\KeyBind-demo-*.log)**MessageBox(Recycled|Matching demo files went to the Recycle Bin.)- recycles matching demo files.
See also: Delete(), EmptyRecycleBin()
Reload()
HotKey: Ctrl+Win+Alt+F5
Reload()- Restart KeyBind and reload its settings. The run queue and window-trigger state are kept, and the original command line is passed to the new instance.
- Open countdowns survive the restart, retaining their running or paused state and full, minimal or hidden view. Running time includes the restart. Timers that reach zero during startup finish once after startup is complete. See
CountDown()for the saved state and failure behaviour. - Use
Abort()when you need to stop the current task and clear the queue instead. - @ExitValue: Empty. KeyBind reloads.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindInfoBox(Reloading KeyBind...|2)**Reload()- flashes a warning, then reloads.
See also: KeyBind(), Quit(), ReloadWindowTriggers()
ReloadWindowTriggers()
ReloadWindowTriggers()- Pick up changes to your Window Triggers without restarting KeyBind.
- @ExitValue: Empty.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindReloadWindowTriggers()
See also: NewTrigger(), Reload(), Triggers()
Rename()
- Rename(Original|New[|1/true|Setting])
- Rename a file or folder. Sentinel can also generate sequence, random and date/time names for you.
- @ExitValue: Path. The file's new full path.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindFileWriteData(@Desktop\draft.txt|draft version\n)**Rename(@Desktop\draft.txt|final.txt)**MessageBox(Renamed|See final.txt on your desktop.)- writes a draft, renames it and confirms.FileWriteData(@Desktop\draft.txt|new draft\n)**FileWriteData(@Desktop\final.txt|old final\n)**Rename(@Desktop\draft.txt|final.txt|true)**MessageBox(Renamed to @ExitValue)- replaces any existing file and uses the returned destination path in a confirmation.Rename(@DroppedItem|@StampDate)- gives a Sentinel file a date-stamped name.Rename(@DroppedItem|@Sequence|1|4)- gives incoming files four-digit sequence names.Rename(@DroppedItem|@Append_sorted|true)- keeps the original name and adds text before the extension.
See also: MoveTo(), OpenWith(), ResetSequence()
Report()
- Report([report type])
- If you supply no argument, this opens a small report chooser where you can select which report to view in your browser; HotKeys, Triggers, Sentinels, Schedules or all of them.
- When the dialog opens, the focus is on "All reports" so you can simply do Ctrl+Win+Alt+Y and then whack the spacebar to get all your reports in your browser.
Report(all)opens HotKeys, Triggers, Sentinels, Schedules reports pages in your browser. Your App Usage report is opened separately withAppUsage().- The four control reports essentially use the same functions as
HotKeyControl(report),TriggerControl(report),SentinelControl(report)andScheduleControl(report). - Report pages are fully interactive (when KeyBind server is enabled) and all changes are immediately live. The report pages will automatically update with any new HotKeys, Triggers, Sentinels and Schedules.
- @ExitValue: the HTML path for a successful named report; True when the chooser opens or all five selected pages open; False on failure or an unknown type.
- Examples:
Report()- opens the report chooser dialog.Report(all)- opens the four control reports (HotKeys, Triggers, Sentinels and Schedules) in your browser.Report(HotKeys)- opens only HotKeys.
See also: AppUsage(), HotKeyControl(), ScheduleControl(), SentinelControl(), TriggerControl().
ResetSequence()
HotKey: Ctrl+Win+Alt+U
- ResetSequence([Number])
- Set Sentinel's automatic rename sequence to a chosen number.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindResetSequence()**MessageBox(Sequence reset|Next @Sequence starts at 1.)- starts again at 1 and confirms.ResetSequence(42)**MessageBox(Sequence reset|Next @Sequence is 42.)- makes 42 the next sequence number and confirms.
See also: Rename(), Sentinel()
Restore()
- Restore([Window])
- Restore a minimized or maximized window to its normal size. With no catcher it restores the window your task last touched, or the active window when the task touched none yet.
- See window matching in
Activate(). - The following window control commands will set the KeyBind's internal 'last used window' flag, so any of these commands can be used later in your task without specifying the window:
Activate(),Minimize(),Maximize(),Restore(),WindowOnTop()orSetTransparency(). - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindRestore()- restores the active window.Minimize(Untitled - Notepad)**Restore(Untitled - Notepad)- minimizes Notepad, then brings it back.
See also: Activate(), CloseWindow(), Dimensions(),
GetWindow(), KillWindow(), Maximize(),
Minimize(), SetTransparency(), WindowOnTop(), WinMove()
Run()
- Run(Path)
- Run one KeyBind
.kcscript file. A relative path resolves against your scripts folder, soRun(ShowMe.kc)runs@ScriptsDir\ShowMe.kc; absolute local paths,\\?\UNC prefixes and network paths work too. Anything that is not an existing.kcfile is refused. - @ExitValue: The script result. The script runs before the next command in the Task.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindRun(ShowMe.kc)- run a script from your scripts folder.
See also: Execute(), RunSelected()
RunSelected()
HotKey: Ctrl+Win+Alt+R
RunSelected()- Run the text currently selected text as a KeyBind Task.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(MessageBox(Hello from RunSelected!))**MessageBox(Next step|Select the line just typed into Notepad, then run it with Ctrl+Win+Alt+R.)- types a runnable KeyBind task into Notepad; select it and run it with the RunSelected HotKey.
See also: Execute(), ExecuteSelected(), Launch()
ShowRunHistory()
ShowRunHistory()- Show this session's run history, most recent first, with time and source kind per task. Filter the list, click a column header to sort. It stays open while KeyBind keeps running, and new tasks appear live.
- Run History.log in KeyBind's temporary folder accumulates across launches. The
max_history_filepreference limits its size in MiB (1,048,576 bytes), default 1. Decimal values must meet the minimum defined by$RUN_HISTORY_MIN_MIBinKeyBind.au3. Smaller positive INI values use that minimum; nonpositive or invalid INI values use the default. The settings command rejects values below that minimum. Exceeding the limit removes oldest complete records until at most 90% of the limit remains. A record larger than the limit cannot be retained. The reader ignores an unfinished final record without a terminating linefeed and accepts tab-separated records or the older Chr(30)-separated format. - Only events since the current launch are displayed by default. Check Show entire history beside On Top to include retained events from previous launches. The
show_entire_historypreference saves this choice for future windows. - The viewer first shows the newest 200 events matching your filter. Scrolling near the bottom loads another 200. Filtering checks the selected history a little at a time so the viewer can stay responsive. Clicking a column header sorts the events loaded so far; older events are added in that order as they load. Loaded events are kept until you close the viewer, change its filter or choose a different history.
- Consecutive runs with exactly the same task text and source share one displayed row. The task preview gains a count prefix, e.g.
[x5] Copy(red), and the time is the latest run. A different task or source ends the group; a filtered-out intervening event also ends it. Sorting changes display order without combining separate groups. Counts include matching records loaded in the selected history scope and increase as older batches or new runs extend the group. The full task text and individual run records inRun History.logremain unchanged. KeyBind(max_history_file|0.5)sets a half-MiB limit and immediately trims the file if needed.- @ExitValue: Boolean. True when the viewer opens or an existing viewer is focused; False if window creation fails.
See also: History(), RunSelected()
ScheduleControl()
See ScheduleControl() under *Control().
Schedules()
HotKey: Ctrl+Win+Alt+Z
- Schedules(on/off/toggle)
- Enable or disable the master switch for all scheduled commands.
- Note: When the master switch turns on, overdue enabled
Customcommands advance to their next occurrence without resetting their cadence. - @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSchedules(on)**MessageBox(Schedules live|The schedules master switch is enabled.)- enables the master switch; individual schedule flags are unchanged.Schedules(off)**MessageBox(Paused|All scheduled commands are paused - resuming now.)**Schedules(on)**MessageBox(Resumed|The schedules master switch is enabled again.)- pauses every schedule, shows the state, then resumes the previously enabled schedules.
See also: Sentinel(), Suspend(), Triggers()
Screen()
- Screen([on|off|toggle])
- Ask Windows to turn the display off or back on.
Screen(off)requests off;Screen(on)requests on. Screen(),Screen(toggle)andScreen(switch)alternate between KeyBind's remembered on/off settings. That setting starts at on, so the first empty call requests off. Waking the screen with the mouse or keyboard does not update it; use explicitonoroffwhen you need a particular state.true,yesand1also mean on;false,noand0also mean off. Letter case does not matter.-makes no change. Unrecognised words make no change and report False.- Mouse or keyboard activity can wake a display turned off this way. Windows and your display hardware determine whether the power request takes effect.
- @ExitValue: True if the Windows call completes, or if
-requests no change; False for an unrecognised argument or a failed call. True does not verify the display's actual power state. - Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Blank the display?|Your screen sleeps until you move the mouse.)**If(@ExitValue|Yes)**Screen(off)**EndIf()- asks first, then blanks the display.Screen(off)**Pause(2s)**Screen(on)- blanks the display briefly, then wakes it again.
See also: ScreenSaver(), SystemSleep()
ScreenSaver()
ScreenSaver()- Start the current Windows screen saver.
- @ExitValue: Empty.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindScreenSaver()
See also: Screen(), SystemSleep()
SelectWord()
SelectWord()- Select the word at the caret or beneath the pointer.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSelectWord()SelectWord()**Copy()**FileAppendData(@Desktop\word-list.txt|@ClipBoard\n)- adds the current word to a list.
See also: DefineSelected(), SpeakSelected(),
WebSearchSelected()
SendMail()
- SendMail(Subject|Body[|To|Attachment])
- Send an email.
- If you create HTML (with <> tags) it gets sent as HTML, otherwise it's plain text, as email should be.
- "To" is optional, and you can set the default "To" address in your prefs; the idea being, you will mostly want KeyBind to send mails to one person; you. All the mail settings are in the options tab of the
ConfigEditor(). - @ExitValue: True when the server accepted the mail, false otherwise.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSendMail(Hello|Testing KeyBind mail)SendMail(Report|See attached|friend@example.com|@Desktop\report.pdf)
See also: Download()
Sentinel()
HotKey: Ctrl+Win+Alt+F
- Sentinel(on/off/toggle[|Names])
- Switch one or more Sentinels on or off.
- Leave the brackets empty to toggle the master switch. Supplying an unknown name simply fails.
- If a watched folder or file goes missing, its Sentinel waits for that target to return. File Sentinels run their task when the file is created or changes, after the file has settled.
- For scripters: switching one Sentinel on also switches the master on (if it was off, you get briefly notified about this), so the Sentinel can start work imediately.
- @ExitValue: True or false.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSentinel(on)**MessageBox(Sentinels on|All folder watchers are enabled.)- switches all Sentinels on and confirms.Sentinel(on|Inbox)**MessageBox(Inbox watching|Drop a file in the Inbox folder to test it.)- switches the Inbox watcher on and invites a test.Sentinel(off|Inbox)**MessageBox(Inbox paused|Dropping files there does nothing right now.)**Sentinel(on|Inbox)**MessageBox(Inbox watching|The watcher is back on - drop a file to test.)- rests the Inbox watcher, shows the state, then resumes it.Sentinel(on)**OpenSentinelFolder()- starts Sentinels and opens their watched folders.
See also: Ignore(), MoveTo(), NewSentinel(), OpenWith(),
SentinelControl()
SentinelControl()
See SentinelControl() under *Control().
SetTransparency()
- SetTransparency([Window|0-100/off])
- Sets how see-through a matching window is, in percent, or the active window when only a value is supplied. 0 is invisible, 100 is fully solid.
- KeyBind converts the percent to the 0-255 machine scale Windows expects, so you never touch machine numbers.
- Use
offto remove transparency and return the window to solid. - See window matching in
Activate(). - Sets KeyBind's internal 'last used window' flag, so later commands in your task can skip the window, just like
Activate(),Minimize(),Maximize(),Restore()orWindowOnTop(). - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSetTransparency(70)- makes the active window slightly see-through.SetTransparency(100)- puts your browser back to fully solid.SetTransparency(Notepad|60)- makes Notepad almost half-transparent.SetTransparency(Notepad|off)- returns Notepad to fully solid.
See also: Activate(), CloseWindow(), Dimensions(),
GetWindow(), KillWindow(), Maximize(),
Minimize(), Restore(), WindowOnTop(),
WinMove()
SetVolume()
- SetVolume(Volume)
- Set the Windows system master volume.
- Prepend the value with + or - to raise or lower the current volume by X%.
- Relative changes past min/max limits gets you 0 or 100, respectively.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSetVolume(35)**Beep(880|200ms)**MessageBox(Volume 35|Heard the tone at 35%.)- sets the volume, proves it with a tone and confirms.SetVolume(+10)**Beep(880|200ms)- raises the volume by 10% and plays a tone at the new level.VarAssign(night_volume|15)**VarSave(night_volume)**VarLoad(night_volume)**SetVolume(@night_volume)**Beep(440|300ms)**MessageBox(Night volume|Saved 15, reloaded it, applied it - hear the quiet tone.)- applies a volume previously saved withVarSave(night_volume).SetVolume(20)**PlaySound(C:\Windows\Media\notify.wav|wait)**SetVolume(50)**MessageBox(Volume restored|Heard it quietly, back to 50 now.)- plays one alert at 20%, then sets the volume to 50%.
See also: Beep(), PlaySound(), Speak()
ShowHotKeys()
HotKey: Ctrl+Win+Alt+K
ShowHotKeys()- Brings up the "Current HotKeys" dialog, which is a nifty list of all your current HotKeys for the current foreground app, with your global HotKeys listed underneath.
- The list can be filtered, and your caret should be there when the list opens, ready-to-type.
- Holding down any combination of modifier keys highlights all matching HotKeys.
- You can edit HotKeys and their tasks; enable/disable, copy Tasks to the ClipBoard, run Tasks. Buttons and context menu for everything, usual malarkey.
- Pressing a listed HotKey closes the dialog and runs its task.
- By default, clicking outside the dialog closes the dialog (you can set this in the Config Editor).
- @ExitValue: True or false. Whether the list showed.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindShowHotKeys()
See also: Menu(), NewHotKey()
Silence()
HotKey: Ctrl+Win+Alt+A
Silence()- Stop all current speech and audio playback started by KeyBind.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSilence()Speak(This is a long announcement.)**Pause(2s)**Silence()- demonstrates stopping KeyBind's current speech and sound together.
See also: PlaySound(), Speak(), StopAudio(),
StopSpeaking()
Sleep()
Alias of Pause()
SnapWin()
SnapWin()- Pull the active window fully inside its display, so a lost off-screen window comes back into view.
WinSnap()is an alias ofSnapWin().- KeyBind uses the window centre to pick the nearest display and keeps the window inside the work area, clear of the taskbar. Oversized windows pin to the top-left corner of the work area. Maximized and minimized windows are left alone.
- @ExitValue: True when the window sits inside or was moved back into view, false when there is no active window to snap.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSnapWin()Activate(Notepad++)**SnapWin()- brings Notepad++ back into view.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**SnapWin()- opens Notepad, waits for its window, then pulls it into view.
See also: Dimensions(), WinMove()
SortLines()
- SortLines([
source text]) - Sorts lines alphabetically.
- The
source textcan be:@Selected,@ClipBoard(the default, when no source is supplied), or a@UserVariablecontaining some text. - @ExitValue: the sorted text.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindCopy(mango\napple\ncherry)**SortLines()**ListView(@ExitValue|Sorted)FileList(@Documents|*.txt|recurse,fullpaths|textfiles)**SortLines(@textfiles)**ListView(@ExitValue|Sorted text-file paths)- lists text files throughout Documents, sorts their full paths and opens them for filtering and copying.
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), Cut(), CutAppend(),
DeDupeLines(), FindReplace(), Num2Words(),
Paste(), PastePlainText(), PasteSlot(),
WordCount()
Speak()
- Speak(Text[|Volume|Rate|Voice|Wait])
- Speak some text aloud using Windows' built-in voices.
- You can use XML and SSML for total control over pronunciation, pauses, pitch, speed, etc..
- @ExitValue: True (if speech was successful).
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSpeak(Good morning!)Speak(Good <emph>morning!</emph>|80|0)FileWriteData(@Desktop\speech.txt|Good morning! KeyBind speaks this file with expression.\n)**FileReadData(@Desktop\speech.txt|speech)**Speak(@speech)- writes a speech file, then reads it aloud.FileWriteData(@Desktop\announcement.txt|Good morning! KeyBind read this file aloud.\n)**FileReadData(@Desktop\announcement.txt|announcement)**Speak(@announcement)- reads a file into a variable, then speaks it.Input(Your Name|What should KeyBind call you?|name)**VarSave(name)**Speak(Good morning @name!)- asks your name once, remembers it, then speaks it.
See also: Define(), SetVolume(), Silence(), SpeakSelected(),
StopSpeaking()
SpeakSelected()
HotKey: Ctrl+Shift+S (sample HotKeys)
SpeakSelected()- Have KeyBind read aloud whatever is selected in the active app.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSpeakSelected()
See also: Define(), DefineSelected(), SelectWord(), Speak(),
StopSpeaking()
StopAudio()
StopAudio()- Stop the audio KeyBind is playing, without interrupting speech.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindPlaySound(C:\Windows\Media\Alarm05.wav)**Pause(1s)**StopAudio()**MessageBox(Silence|Started the alarm, stopped it after one second.)- starts playback, then stops it.PlaySound(C:\Windows\Media\Alarm05.wav)**Pause(2s)**StopAudio()**MessageBox(Stopped|Playback cut off mid-sound.)- starts a long built-in alarm, cuts it off and confirms.
See also: Beep(), PlaySound(), Silence()
StopRecording()
StopRecording()- Finish recording. If the recorder edit option is on, open the Recording Editor to edit, test and save the result as a
.kcscript. With editing off, this command does not open the editor or save the script. - @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindStopRecording()
See also: Record(), RecorderControl()
StopSpeaking()
StopSpeaking()- Stop the current spoken message.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindStopSpeaking()Speak(This message will be interrupted.)**Pause(2s)**StopSpeaking()- stops speech after two seconds.
See also: Silence(), Speak(), SpeakSelected()
Suspend()
HotKey: Ctrl+Win+Alt+B
- Suspend(on/off/toggle)
- Temporarily pause or resume KeyBind's HotKeys and automation without closing it:
onsuspends KeyBind;offwakes it back up. - @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSuspend(off)**MessageBox(KeyBind awake|HotKeys and automation are running.)- wakes KeyBind up and confirms.Suspend(on)**InfoBox(Suspended|HotKeys pause for 5 seconds...|-|-|5s)**Suspend(off)**MessageBox(Awake again|HotKeys are running.)- suspends briefly, shows the state, then wakes back up so nothing stays paused.
See also: Schedules(), Sentinel(), Triggers()
SwitchColorFormat()
- SwitchColorFormat(Number/Name)
- Switch to the colour format you need for the rest of the task. If the clipboard still contains the last colour KeyBind copied, it is converted for you immediately.
- Choose from
RGB Int, AutoIt RGB, AutoIt BGR, Delphi Hex, Visual C++ Hex, RGB Float, Hue/Sat/Lum, CMYK and Web Hex. - @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindSwitchColorFormat(5)SwitchColorFormat(v)Mag()**Paste()**SwitchColorFormat(5)**Paste()
See also: ColorReport(), CopyColor(), Mag()
SystemBeep()
- SystemBeep([frequency|duration])
- Plays a tone using the Windows Beep function. The volume is controlled via your "System Sounds" mixer control.
- Frequency is in hertz; duration in milliseconds. With no parameters, it uses 1000Hz for 50 milliseconds.
- Frequency and duration use the same parsing and limits as
Beep(). - The command waits for the tone to finish. It returns the Windows Beep result, or False for invalid parameters.
- @ExitValue: True when beep params were accepted, False for invalid parameters.
- Examples:
SystemBeep(1000|50)- a 50-millisecond Windows pip at 1000Hz.SystemBeep()- the same default pip.
SystemHibernate()
SystemHibernate()- Put Windows into hibernation.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Hibernate this PC?|Your session saves to disk and the PC powers off.)**If(@ExitValue|Yes)**SystemHibernate()**EndIf()- asks first, then hibernates only on Yes.
See also: LockPC(), SystemShutdown(), SystemSleep()
SystemLogOff()
SystemLogOff()- Log off the current Windows user.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Log off Windows?|Open programs close - save first.)**If(@ExitValue|Yes)**SystemLogOff()**EndIf()- asks first, then logs off only on Yes.
See also: LockPC(), SystemReboot(), SystemShutdown()
SystemReboot()
SystemReboot()- Restart Windows.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Restart Windows?|Unsaved work may be lost.)**If(@ExitValue|Yes)**SystemReboot()**EndIf()- asks first, then restarts only on Yes.
See also: SystemLogOff(), SystemShutdown()
SystemShutdown()
SystemShutdown()- Shut down and power off Windows.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Shut down Windows?|Unsaved work may be lost.)**If(@ExitValue|Yes)**SystemShutdown()**EndIf()- asks first, then shuts down only on Yes.
See also: SystemHibernate(), SystemLogOff(),
SystemReboot()
SystemSleep()
SystemSleep()- Put Windows into sleep/standby.
- @ExitValue: Unused.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Sleep this PC?|Work stays open - just napping.)**If(@ExitValue|Yes)**SystemSleep()**EndIf()- asks first, then sleeps only on Yes.
See also: LockPC(), Screen(), SystemHibernate()
Terminate()
- Terminate(Program/Process ID)
- Stop a running program or process.
- @ExitValue: Number. AutoIt's error flag - 0 means it worked.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindTerminate(notepad.exe)
See also: IfRunning(), KillProcess()
TestMailSettings()
TestMailSettings()- Send one test message using the saved Mail settings, including
to_address. The subject isHello from KeyBind!; the body isKeyBind mail test., a blank line, thenIt works!. - The web Options Test Mail Settings button uses this command and displays its result beside the button. Running the command does not open a desktop result dialog. The Config Editor's Test button uses the same sender and retains its result dialog.
- @ExitValue: True when the SMTP server accepts the message, False on failure. Acceptance does not establish delivery to the recipient's inbox.
- Example:
TestMailSettings()
See also: Options(), SendMail().
Text()
- Text(Text)
- Type supplied text at the caret; supplied line breaks become real new lines.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindText(Hello from KeyBind!)VarLoad(greeting)**Text(@greeting)- types a previously saved greeting.Input(Sign Off|Enter your closing line|sign_off)**Text(@sign_off)- asks for text at run time and types the answer.Text(Created on @Date at @Time)- types live date and time macros.
See also: Copy(), Date(), KeyDelay(),
Time()
Time()
Time()- Type the current time at the caret.
- @ExitValue: 1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindLaunch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Finished at )**Time()**MessageBox(Stamped|Current time typed into Notepad.)- adds a labelled timestamp to a fresh note.
TriggerControl()
See TriggerControl() under *Control().
Triggers()
HotKey: Ctrl+Win+Alt+T
- Triggers(on/off/toggle[|window/system/clipboard])
- Enable or disable the Triggers master switch, or one type:
window,systemorclipboard. - Leave parameters empty to flip the master switch. Window, System and ClipBoard type switches and individual definitions keep their own enabled states.
- @ExitValue: True. False when a type name is unknown.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindTriggers(on)**MessageBox(Triggers live|The Triggers master switch is enabled.)- enables the master switch; type and individual trigger flags are unchanged.Triggers(off)**MessageBox(Paused|Triggers are paused - resuming now.)**Triggers(on)**MessageBox(Resumed|The Triggers master switch is enabled again.)- pauses everything, shows the state, then resumes the previously enabled types and triggers.Triggers(off|window|system)**MessageBox(Partial pause|Window and System Triggers are disabled; the clipboard switch is unchanged.)**Pause(3s)**Triggers(on|window|system)**MessageBox(Resumed|Window and System Triggers are back on.)- disables two trigger types briefly, then enables them.Triggers(on|clipboard)**MessageBox(Clipboard live|Copy something to test the Clipboard Trigger.)- enables the ClipBoard type switch and invites a test; the master switch must also be on.
See also: NewTrigger(), ReloadWindowTriggers(),
Schedules(), Suspend()
Url()
HotKey: Ctrl+Alt+Home (sample HotKeys)
- Url(URL)
- Open a web address in your usual browser or associated app.
Visit()is an alias ofUrl().- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindUrl(https://example.com)VarLoad(help_page)**Url(@help_page)- opens a previously saved web address.Input(Open Website|Enter a web address|website)**Url(@website)- asks which site to open.
See also: Download(), HttpGET(), HttpPOST(), Launch(), WebSearchSelected()
Usage()
Alias of AppUsage()
VarAssign()
- VarAssign(Name|Value)
- Give some information a name, so you can use it again later in the task or save it permanently.
- Plain arithmetic calculates itself.
- @ExitValue: Number. 1 when assignment succeeds, 0 when AutoIt assignment fails. The assigned value is stored in the named user variable. A reserved name returns the text "That, Macro Is Reserved!" with @error -1.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindVarAssign(greeting|Good morning)**MessageBox(Stored|@greeting - available to later tasks.)- names a value, then shows it.Input(Your Name|What should KeyBind call you?|user_name)**VarAssign(greeting|Good morning @user_name!)**MessageBox(@greeting)**FileWriteData(@Desktop\greeting.txt|@greeting\n)- asks your name, greets you, shows it and keeps it in a desktop file.VarAssign(macro_name|\@Time)**MessageBox(Literal|Stored the text @Time instead of the time: @macro_name)- stores the text@Time, instead of the current time.VarAssign(started_at|@Time)**FileWriteData(@Desktop\backup-source.txt|Backup me at @Time\n)**FileCopy(@Desktop\backup-source.txt|@Desktop\backup-copy.txt|true)**If(@ExitValue)**FileAppendData(@Desktop\backup.log|Backup started at @started_at and finished at @Time\n)**MessageBox(Backup logged|See backup.log on your desktop.)- records when a successful backup started and finished.FileWriteData(@Desktop\archive-demo.txt|pretend archive contents\n)**FileSize(@Desktop\archive-demo.txt|KB)**VarAssign(archive_size|@ExitValue)**MessageBox(The demo file is @archive_size KB)**FileAppendData(@Desktop\sizes.log|archive-demo.txt: @archive_size KB\n)- keeps the measured size available after the message box so it can also be logged.VarAssign(price|19)**VarAssign(tax|4)**VarAssign(total|@price+@tax)**MessageBox(Total|19 + 4 = @total)- adds two variables and shows the answer; anything that is only arithmetic is worked out.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarDelete(),
VarLoad(), VarSave(), VarsDeleteAll(),
VarsDisplay(), VarsLoadAll(), VarsSaveAll()
VarDelete()
- VarDelete(Variable)
- Delete one saved user variable from the ini and clear its current value.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindVarAssign(scratch_demo|Delete me soon)**MessageBox(Stored|@scratch_demo)**VarDelete(scratch_demo)**MessageBox(Deleted|scratch_demo is gone - run VarsDisplay to check.)- stores a throwaway, shows it, deletes it and confirms.VarDelete(greeting)**VarsDisplay()- removes one saved variable and shows what remains.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarAssign(),
VarLoad(), VarSave(), VarsDeleteAll()
VarLoad()
- VarLoad(Variable)
- Load a previously-saved user variable from ini.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindVarAssign(favourite_drink|Tea)**VarSave(favourite_drink)**VarDelete(favourite_drink)**VarLoad(favourite_drink)**MessageBox(Restored|KeyBind remembered: @favourite_drink)- saves a drink, forgets it, loads it back and proves it.VarLoad(greeting)**Text(@greeting)- restores one saved variable and types it.VarAssign(backup_dir|@Desktop)**VarSave(backup_dir)**FileWriteData(@Desktop\notes.txt|back me up\n)**VarLoad(backup_dir)**FileCopy(@Desktop\notes.txt|@backup_dir\notes-backup.txt|1)**MessageBox(Backed up|Restored destination used - see notes-backup.txt.)- restores a saved destination and uses it for a backup.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarAssign(),
VarDelete(), VarSave(), VarsLoadAll()
VarSave()
- VarSave(Variable)
- Save one specified user variable to the ini for later use. Real line breaks are encoded as
\nor\r, and literal backslashes as\\. Values over 512 characters after encoding are saved as empty values. Setvar_save_max_sizein the[KeyBind]section to change the character limit. The variable in memory is unchanged. - @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindVarAssign(greeting|Good morning)**VarSave(greeting)**MessageBox(Saved|Good morning is kept for next time KeyBind starts.)- creates one variable, saves it permanently and confirms.Input(Your Name|What should KeyBind call you?|user_name)**VarSave(user_name)- asks once and remembers the answer.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarAssign(),
VarDelete(), VarLoad(), VarsSaveAll()
VarsDeleteAll()
VarsDeleteAll()- Delete every saved user variable from the ini and clear all current variables.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindConfirm(Wipe every saved variable?|Nothing is kept - this cannot be undone.)**If(@ExitValue|Yes)**VarsDeleteAll()**VarsDisplay()**Else()**MessageBox(Cancelled|Nothing was deleted.)**EndIf()- asks first, then wipes everything and shows the empty table.VarsDisplay()**Confirm(Clear the table above?|Every saved variable goes.)**If(@ExitValue|Yes)**VarsDeleteAll()**VarsDisplay()**Else()**MessageBox(Kept|The table above is untouched.)**EndIf()- shows the current table, asks, then clears and shows the empty result.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarAssign(),
VarDelete(), VarsDisplay(), VarsLoadAll(),
VarsSaveAll()
VarsDisplay()
HotKey: Ctrl+Win+Alt+V
VarsDisplay()- Shows a small window with all the user variables currently available to your tasks.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindInput(Your Name|What should KeyBind call you?|user_name)**VarSave(user_name)**VarsDisplay()- remembers your answer, then shows it in the table.VarAssign(project|KeyBind)**VarAssign(status|testing)**VarsDisplay()- creates two values, then displays them together.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarAssign(),
VarLoad(), VarSave(), VarsLoadAll()
VarsLoadAll()
VarsLoadAll()- Load all previously-saved user variables from KeyBind.ini.
- Put this in your startup_task and all your user variables will be available at launch.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindVarsLoadAll()**VarsDisplay()- restores every saved variable and shows the result.VarAssign(project_folder|@Desktop)**VarSave(project_folder)**VarDelete(project_folder)**VarsLoadAll()**Launch(@project_folder)**MessageBox(Opened|Forgot the folder, reloaded it from disk, opened your desktop.)- proves the round trip: forget, reload, open the remembered folder.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarAssign(),
VarLoad(), VarsDisplay(), VarsSaveAll()
VarsSaveAll()
VarsSaveAll()- Save all current user variables to the ini for later use. Real line breaks are encoded as
\nor\r, and literal backslashes as\\. Values over 512 characters after encoding are saved as empty values. Setvar_save_max_sizein the[KeyBind]section to change the character limit. Variables in memory are unchanged. - Put this in your shutdown_task and all your user variables will be available at launch.
- @ExitValue: True.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindInput(Your Name|What should KeyBind call you?|user_name)**VarsSaveAll()**MessageBox(All kept|@user_name and everything else reloads next time.)- remembers your answer with everything else, then confirms.VarAssign(project_folder|@Desktop)**VarAssign(night_volume|15)**VarsSaveAll()**MessageBox(Saved|Desktop folder and volume 15 reload next time.)- stores two preferences for future KeyBind sessions and confirms.
See also: DefineSelected(), FileLineCount(),
FileReadData(), Input(), VarAssign(),
VarSave(), VarsDeleteAll(), VarsLoadAll()
Visit()
Alias of Url()
Wait()
- Wait(Window[|Timeout])
- Wait until a matching window becomes active, then carry on with the task; KeyBind remains responsive while it waits.
- See window matching in
Activate(). - @ExitValue:
"DONE"when the window is already active or a wait insideForEach()completes; True when an ordinary wait queues its continuation; False on failure. Queuing a continuation does not mean the window is active. - Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindWait(Notepad++|10s)Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(KeyBind found this window.)- launches an app, waits for its window and then types into it.
See also: Activate(), IfRunning()
WebSearchSelected()
HotKey: Ctrl+Win+Alt+W
- WebSearchSelected([URL])
- Look up the selected word or words with your preferred search engine, in your browser. Works from anywhere.
- KeyBind looks up the word at the caret position. If you already have a word or words selected, that selection is sent.
- For scripters: the default address lives in your ini as
web_search_url. It must contain the @LookUp macro, or KeyBind warns you and does nothing. - @ExitValue: True or false. Whether the browser opened.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindWebSearchSelected()- using default (ini) parametersWebSearchSelected(https://duckduckgo.com/?q=@LookUp)- looks up the word on the specified search engine.
See also: Define(), DefineSelected(), HttpGET(), HttpPOST(), SelectWord(), Url()
{WheelUp} / {WheelDown}
- Mouse-wheel triggers, for use as HotKeys in your settings (Global or per-app, with the usual ^!+# modifiers).
- The notch always reaches the app as well (pass-through); the trigger simply fires your task on top.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBind^{WheelUp}=MouseWheel(up|3)^!{WheelDown}=Silence()
See also: MouseWheel()
WindowMove()
Alias of WinMove()
WindowOnTop()
- WindowOnTop([Window|Value])
- Pin a matching window above all others, or the active window when left empty.
- See window matching in
Activate(). - The following window control commands will set the 'last used window', so any of these commands can be used later in your task without specifying the window:
Activate(),Minimize(),Maximize(),Restore(),WindowOnTop()orSetTransparency(). - @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindWindowOnTop()WindowOnTop(Untitled - Notepad|off)
See also: Activate(), CloseWindow(), Dimensions(),
GetWindow(), KillWindow(), Maximize(),
Minimize(), Restore(), SetTransparency(), WinMove()
WinMove()
HotKey: Ctrl+Alt+Numpad0-9, F1 (sample HotKeys)
- WinMove(X|Y|Width|Height[|
Window]) - Move the active window to a specific position with a specific size.
WindowMove()is an alias ofWinMove().- Pass "-" for any parameter you do not wish to change.
- Use +/- to shift the current value, e.g. +50 to make some value 50 pixels more than it currently is.
WinMove()normally targets the active window (Activate()will do this for you) or you can target a window directly with the optional 5th parameter. SeeActivate()for full details of how to macth windows.- @ExitValue: True on success, false on failure.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindWinMove(2|2|@DesktopWidth-4|@DesktopHeight-4)- *almost* full-screen window you can still click around.WinMove(-|-|+50|-)- make the active window 50 pixels wider.Activate(Notepad++)**WinMove(0|0|@DesktopWidth/2|@DesktopHeight)- puts Notepad++ on the left half of the screen.WinMove(0|0|@DesktopWidth/2|@DesktopHeight|Notepad++)- same again, but specifying window directly.Launch(notepad.exe)**WinMove(@DesktopWidth/2|0|@DesktopWidth/2|@DesktopHeight)- launch notepad and put it on the right half of the screen.
See also: Activate(), CloseWindow(), Dimensions(),
GetWindow(), KillWindow(), Maximize(),
Minimize(), Restore(), SnapWin(),
WindowOnTop()
WinSnap()
Alias of SnapWin()
WordCount()
- WordCount([
source text]) - Count words in a string
- The
source textcan be:@Selected,@ClipBoard(the default), a@UserVariable, or literal text. - @ExitValue: the word count.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindWordCount(the quick brown fox jumps over the lazy dog)**MessageBox(Words|Phrase contains @ExitValue words.)Copy(the quick brown fox jumps over the lazy dog)**WordCount()**MessageBox(Clipboard words|Clipboard holds @ExitValue words.)- counts the words currently on the clipboard.FileWriteData(@Desktop\essay.txt|the quick brown fox jumps over the lazy dog\n)**FileReadData(@Desktop\essay.txt|essay)**WordCount(@essay)**Num2Words(@ExitValue)**MessageBox(Words|essay.txt contains @ExitValue words.)- counts a desktop file's words, then spells the total.
See also: ChangeCase(), ClearSlots(), Copy(),
CopyAppend(), Cut(), CutAppend(),
DeDupeLines(), FileLineCount(), FindReplace(),
Num2Words(), Paste(), PastePlainText(),
PasteSlot(), SortLines()
*Control()
These are the master control functions, with them you can set or edit any aspect of your HotKeys, Triggers, Sentinels and Schedules (there's also one for recorder options).
HotKeyControl()
- HotKeyControl(action|HotKey[|setting=value...])
- Creates, edits, enables, disables, toggles, deletes or queries a HotKey without opening dialogs or restarting KeyBind. Use
NewHotKey()for the interactive wizard, also available through the New HotKey button in the Current HotKeys dialog (Ctrl_Win+Alt+K). newrequirestask=; the HotKey is immediately enabled unlessenabled=falseis supplied.editchanges only supplied settings, retaining omitted setting. If the HotKey does not exist, supplyingtask=creates it with the same defaults asnew.- Settings for
newandedit:scope=,enabled=true/falseandtask=. Editing also acceptshotkey=to change the combination andnew_scope=to move it to another application scope. task=must be last. Everything following it belongs to the task, including pipes and text such asenabled=false. Empty tasks and physical line breaks are refused; literal\nis fine inside task data. Missing or invalid parameters simply fail without opening any dialogs.enable,disable,toggleanddeleteaccept only the target HotKey and optionalscope=. The target must exist. Deletion requires no confirmation. Disabled HotKeys can be saved with combinations that conflict with currently enabled HotKeys or with KeyBind's Abort/Recorder HotKeys; conflict checks apply when enabling or assigning an enabled combination.getis used to query the current parameters of any HotKey.getaccepts optionalfield=task(the default),field=enabled,field=exists,field=hotkeyorfield=scope. Task, HotKey and scope return the text. Enabled and exists return true/false. A missing HotKey returns False without error forfield=exists; other fields fail will for missing HotKey. Ambiguous duplicate definitions fail rather than selecting one.HotKeyControl(report)opens a snapshot of all saved HotKeys. See ,Report()for more details.- Changes take effect immediately.
- @ExitValue: True for a successful change; the selected value for
get; the HTML path forreport; False for failure.error: 0 on success; 1 invalid or incomplete parameters; 2 missing target, existing enabled HotKey, occupied destination or ambiguous duplicate; 3 activation conflict; 4 failed file update; 5 unavailable keyboard registration; 6 report browser-launch failure. Registration availability is checked when keyboard registration is permitted; suspended or capture-restricted HotKeys are registered when that restriction ends. Failed saves retain the original INI. - Examples:
HotKeyControl(report)HotKeyControl(report|scope=Notepad++)HotKeyControl(report|^!#{K})HotKeyControl(new|^!+#{F8}|task=AppUsage())HotKeyControl(new|^!+#{F6}|scope=Notepad++|enabled=false|task=Speak(Hello!))HotKeyControl(edit|^!+#{F8}|task=Beep(880|dur=150ms))HotKeyControl(edit|^!+#{F6}|scope=Notepad++|hotkey=^!+#{F7}|enabled=true)HotKeyControl(edit|^!+#{F7}|scope=Notepad++|new_scope=Global)HotKeyControl(disable|^!+#{F8})HotKeyControl(toggle|^!+#{F6}|scope=Notepad++)HotKeyControl(get|^!+#{F8}|field=enabled)HotKeyControl(delete|^!+#{F8})
See also: NewHotKey(), , Report(), ScheduleControl(), ShowHotKeys()
RecorderControl()
- RecorderControl(Option|Value)
- Tweak one recorder option right now, without reloading. Changes applies live and the setting is not saved to KeyBind's ini file.
- Names:
settle_ms, min_pause_ms, click_ms, jitter_px, drag_px, hotkeys(embed or raw),max_events, edit, stoplag_ms, coords(absolute or window); theskip_passwordssetting can only be set in the ini file / KeyBind Config, and is ignored by this command.. - The change lasts until recorder preferences are loaded again, including when the next recording starts. The numeric record_* settings accepted by
KeyBind()save and change only the named option; other temporaryRecorderControl()choices are retained. - All these options can be set permanently in KeyBind Config
- @ExitValue: True or false. Whether the option was accepted.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindRecord(@Desktop\tight-job.kc)**RecorderControl(min_pause_ms|0)**MessageBox(Recording raw|Every gap becomes a Pause() - perform actions, then StopRecording(). Saved to tight-job.kc.)- records actions to a desktop script withPause()commands for every gap.RecorderControl(hotkeys|raw)**MessageBox(Set|Fired HotKeys land as single trigger lines in the current recording.)- run during recording to store fired HotKeys as single trigger lines.RecorderControl(coords|window)**MessageBox(Set|Clicks record relative to the clicked window in the current recording.)- run during recording to use window-relative clicks, with Activate([CLASS:..]) lines.
See also: Record(), StopRecording()
ScheduleControl()
- ScheduleControl(action|name[|setting=value...])
- ScheduleControl(report[|name])
- Create, change, enable, reset, disable or delete one named schedule. Use
Schedules()for the master switch. newcreates a complete schedule, so long as you supply all the required parameters.editchanges only specified settings.editcan also create a new schedule if you supply all required settings and a unique name. Use whichever you prefer!enable,disable,resetanddeleterequire the name of an existing schedule.- For a new schedule, supply
frequency,time,enabledandtask.frequencycan beDaily,Weekdays,Weekends,One DateorCustom.One DateandCustomalso needdate=YYYY/MM/DD;Customneedsrepeat=number Unit, usingYears,Months,Weeks,Days,HoursorMinutes, e.g.repeat=15 Minutes resetis used to reset the start time of aCustomschedule (e.g.frequency=Custom), so your 20m take-a-break reminder can be controlled!- Set
skip_apps=with any apps you want this schedule to skip if these appse are at the front, e.g. vlc.exe. Seperate apps with a semicolon; same format as the idle apps list, e.g.vlc.exe;mpc-hc64.exe - In the Schedules tab, hover over the Skip for these apps group, input or Pick button for its information-box help. Drop one or more .exe files or program shortcuts onto that group to append their executable names to the semicolon-separated list. Existing patterns are retained. Non-executables and folders are ignored. Use Save to keep changes to the selected schedule.
- Queries use
get|name|field=.... Supported fields:timeanddate. Time returns the savedH:MMam/pmtext; date returns the savedYYYY/M/Dtext. - Put
task=last so pipes inside the task don't get mistaken forScheduleControl()commands. reportcreatesServer\Schedules.htmland opens it in the default browser. Omit the name for all schedules, or supply one exact name. Cards show the schedule name, frequency, time, enabled state and relevant date/repeat values. Time and Date or Start/next-due values are clickable: time opens hour, minute and am/pm selectors with a Now button, date opens a date picker, and each save applies immediately through ScheduleControl edit validation. Custom dates are the stored start or next-due date; reporting does not calculate or advance them. Expand Details for the task, skip-app rules, creation time, stored occurrence marker and stored enabled value. Search includes collapsed details; Kind filters frequency and State filters saved enabled state. The master switch and KeyBind suspension appear separately. A missing schedules file produces an empty report. The sharedServer\KeyBind.cssis created only when absent. Reporting changes no schedule, runtime state or preference.- @ExitValue: True on success for changes; the selected value for
get; the HTML path on successful report creation; false for an invalid command, unknown schedule or report failure. - Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindScheduleControl(new|Morning reminder|frequency=Daily|time=08:30am|enabled=true|task=Beep(880|dur=150ms))ScheduleControl(new|Queue check|frequency=Custom|date=2026/10/05|time=08:30am|repeat=15 Minutes|enabled=true|task=MessageBox(Check the queue.))ScheduleControl(edit|Morning reminder|time=09:00am)ScheduleControl(get|Morning reminder|field=time)ScheduleControl(disable|Morning reminder)ScheduleControl(report)ScheduleControl(report|Morning reminder)
See also: Schedules()
SentinelControl()
- SentinelControl(action|name[|setting=value...])
- Configures Folder and File Sentinels without opening dialogs or restarting KeyBind. Actions:
new,edit,enable,disable,toggle,delete,get,newgroup,editgroup,deletegroup,link,unlinkandreport. UseNewSentinel()for the setup wizard, orSentinel()for the master switch and switching several named Sentinels. - The name identifies one Sentinel. Names use the same cleaning as the editor: spaces and unsupported characters become underscores, repeated underscores collapse, and leading/trailing underscores or hyphens are removed. Names are matched without case sensitivity. A blank result is invalid.
task=is always last. Everything after it belongs to the task, including pipes and apparent settings. For example,task=Beep(880|dur=150ms)is one task. Physical line breaks are refused; literal\nremains task data. Unknown settings, duplicate settings and invalid values fail before saving.newrequires a target and a nonempty task.kind=folderis the default and requiresfolder=;kind=filerequiresfile=. An existing name is refused, even if disabled.editchanges supplied settings only; when the name does not exist, it creates a definition if the required target and task are supplied. Missing settings on an existing definition retain their saved values.- Core settings:
kind=file/folder: selects the active Sentinel kind. The inactive kind's path, task and Folder groups remain saved. Changing kind requires a saved or supplied target and nonempty task for the selected kind. Switching from File to Folder removes that Sentinel from its shared File task group.folder=andfile=: save the corresponding watched path, including the inactive kind's path. Paths support KeyBind @Tokens. Existing targets must have the indicated kind; missing targets may be saved. Creation enables an existing valid target by default, otherwise creates a disabled definition. Explicitenabled=truecan enable a missing target, which waits for that path to become available.enabled=true/false: changes the saved enabled flag. Disabled Folder Sentinels can share a watched folder; enabling one fails if another enabled Folder Sentinel owns it. File Sentinels may watch the same file.rate=: a number of seconds, or a duration ending inms,s,m,hord. The minimum is one second; smaller, negative or malformed values fail. New definitions default to three seconds. The setting uses the existing fallback/retry timing; it does not add another timer.ignore=: comma-separated ignored Folder extensions. An empty value clears the list. New definitions use the existing defaultini,desktop.mask=: the nonempty Folder scan mask. New definitions use the configured Sentinel default mask. New definitions begin with the existingAllgroup.name=: renames an existing definition, including groups, task backups and saved pause information. An occupied destination is refused. Other Sentinels with names beginning with the same text retain their definitions.task=: changes the active kind's task. Editing a linked File Sentinel changes the shared task for every member, preserving each saved individual task. A Folder default-task edit resets its saved pauses and failure counts; group-task edits reset only that group's pause and failures. Previous task text is retained through the existing task-backup settings.
enable,disable,toggleanddeleterequire an existing name and accept no settings. Explicitly enabling a Sentinel also enables the Sentinel master switch, matching the existing named-switch command. Creating a definition without an explicit enabled setting leaves the master switch unchanged. Deleting the final Sentinel turns the master off. Deletion removes the Sentinel's settings and watcher registrations, without deleting its watched files or folders and without a confirmation dialog.- Folder group actions:
newgrouprequiresgroup=and nonemptyextensions=; optional finaltask=sets its task. An occupied group name is refused. Without a task, the group inherits the Folder Sentinel's default task.editgrouprequires an existinggroup=. It acceptsextensions=,name=for renaming, and finaltask=. Omitted settings remain unchanged. An empty task restores inheritance from the default task. Group names are cleaned through the existing group-name rules; configuration field names cannot be used as group names.deletegrouprequiresgroup=. It removes that group's extensions, task and task backup, clears its pause information and updates the selected group. The final group cannot be deleted. Group operations on File Sentinels fail.
link|name|with=otherlinks two File Sentinels. An unlinked Sentinel can join an existing group; existing members remain linked. A new group uses the first named Sentinel's effective task. Joining an existing group uses its shared task. Distinct existing groups are not silently merged.unlink|nameremoves only that member and restores its individual task. If fewer than two members remain, the final member also returns to its individual task and the unused shared task/backup is cleared. Unlinking an unlinked File Sentinel succeeds without changes.SentinelControl(report)opens an HTML snapshot of all Sentinels.SentinelControl(report|name)includes only the named Sentinel. Each request replacesServer\Sentinels.html. Search and kind/enabled filters operate in the browser. The snapshot lists active-kind settings, target availability, exact tasks, Folder groups and saved pause details; File Sentinels show shared task membership and their saved individual task. Master-off, KeyBind suspension and missing targets are identified separately. Reports do not change Sentinel settings or watcher state. Generate another report to obtain a fresh snapshot.- Sentinel and AppUsage reports share
Server\KeyBind.css. KeyBind installs this stylesheet only if absent; edit it to customize report appearance. Existing CSS is never overwritten. An existingServer\AppUsage\AppUsage.cssis no longer used. - Queries use
get|name|field=.... The default field istask. Supported fields:exists,enabled,name,kind,file,folder,rate,ignore,mask,task,individual_task,groupsandlinked_task. Exists/enabled return Boolean values; the rest return text. Paths and rate return their stored preference text, which may contain @Tokens or duration units. Groups returns a comma-separated list; linked_task returns the shared task's internal key or an empty string. Task returns the effective shared File task; individual_task returns its saved private task. - Add
group=to query a Folder group. Its fields areexists,name,extensionsandtask. Group task returns the group's own saved text, which is empty when it inherits the default. A missing Sentinel returns False without error for its ordinaryfield=existsquery; other missing-target queries fail. - Related settings are saved in one verified atomic update. File failures retain the previous definition and runtime settings. Watchers for changed targets/kinds, renamed definitions and deleted definitions are stopped; the existing watcher pump resumes the appropriate monitoring. Unrelated watcher registrations and timers remain intact. When a running Sentinel changes or deletes its own definition, its current command finishes and the remainder of that old scan is abandoned; the File watcher does not recreate deleted state after its task returns.
- @ExitValue: True for a successful change; the selected value for
get; the HTML path forreport; False for failure.error: 0 success; 1 invalid/incomplete parameters or an incompatible target kind; 2 missing target, occupied name or occupied group; 3 Folder ownership conflict, conflicting linked groups or deletion of the final Folder group; 4 failed file update; 5 report browser-launch failure. Configuration actions do not open dialogs; report opens the default browser. - Examples:
SentinelControl(report)SentinelControl(report|Example_Folder)SentinelControl(new|Example_Folder|folder=@Desktop\SentinelDemo|enabled=false|task=Ignore())SentinelControl(edit|Example_Folder|rate=5s|ignore=tmp,bak)SentinelControl(newgroup|Example_Folder|group=Images|extensions=jpg,png,webp|task=MoveTo(@Desktop\SortedImages))SentinelControl(editgroup|Example_Folder|group=Images|name=Pictures|extensions=jpg,png)SentinelControl(get|Example_Folder|group=Pictures|field=extensions)SentinelControl(deletegroup|Example_Folder|group=Pictures)SentinelControl(new|Example_File|kind=file|file=@Desktop\notes.txt|enabled=false|task=Speak(The watched file changed.))SentinelControl(new|Other_File|kind=file|file=@Desktop\other-notes.txt|enabled=false|task=Beep(880|dur=150ms))SentinelControl(link|Example_File|with=Other_File)SentinelControl(edit|Other_File|task=Speak(A linked file changed.))SentinelControl(get|Other_File|field=individual_task)SentinelControl(unlink|Other_File)SentinelControl(edit|Example_File|name=Renamed_File)SentinelControl(disable|Renamed_File)SentinelControl(delete|Renamed_File)
See also: HotKeyControl(), NewSentinel(), ScheduleControl(), Sentinel()
TriggerControl()
- TriggerControl(action|target[|kind=window/system/clipboard][|setting=value...])
- Actions:
new,edit,enable,disable,toggle,delete,getandreport. Configuration actions run without dialogs or restarting KeyBind. Report opens the default browser. newrequires a missing target, its kind and a complete valid definition. An existing target is refused even when disabled.editchanges only supplied fields on an existing target; when absent, it creates the definition if kind and all required fields are supplied. Every creation requires a nonemptytask=. System and Clipboard creation also requireevent=. Window creation requires a catcher or a resolvable friendly name.- For an existing definition, kind may be omitted only when the target identifies exactly one trigger across all three kinds. Supply
kind=when names overlap. Kind selects the section; it does not convert an existing definition to another kind. System and Clipboard targets use their saved names. A quoted complete stored key can identify a specific System/Clipboard definition when duplicated names exist. Window targets accept an existing friendly mapping or raw catcher. Exact/always/grace modifiers are normally ignored for target lookup; a quoted target containing explicit modifiers selects that complete raw key. Ambiguous matches fail. task=is always last. Everything after it is exact task text, including pipes, quotes and apparent settings. Physical line breaks are invalid; literal\nremains data. Other parameters containing pipes can be enclosed in matching single or double quotes. Double the matching quote to include it inside a quoted value. For example,pattern="hello|world"supplies regex alternation. Quotes begin at the start of a parameter or immediately after its equals sign; they are not interpreted inside task text.- Common settings for new/edit:
enabled=true/false,task=andname=. New definitions default to enabled. Name renames a System or Clipboard definition; it cannot be blank or contain a pipe, equals sign or physical line break. Window name adds or reuses a friendly mapping as described below. Unknown, duplicate, irrelevant or malformed settings fail before saving. - Window settings:
catcher=: the window catcher, or a friendly mapping that resolves to it. Use this field explicitly for literal title text when creating a trigger whose target name has no mapping. Catchers cannot contain an equals sign or physical line break because they form INI keys. The catcher field takes a bare catcher; supply exact/always/grace through their separate fields.exact=true/falseandalways=true/false: the existing exact-match and always-trigger flags. They default to false unless supplied by an explicitly formatted target.grace=: a whole nonnegative number of seconds, optionally suffixeds,m,hord. Empty or zero removes the grace period. The existing global grace-timer preference remains in effect.name=Notepad++addsNotepad++=catcherto[Title Mappings]in Strings.ini. Reserved Global/All scope names cannot be used as friendly mappings. An identical existing mapping is reused. An existing name with a different catcher, including different letter case, fails rather than redirecting other HotKey scopes. A name-only creation requires an existing nonempty mapping; unknown names fail instead of silently becoming literal title matches. Supplyingcatcher=with an unmapped target name creates that friendly mapping unlessname=explicitly supplies another name.- Changing a catcher does not redirect old friendly mappings. Deleting a trigger leaves all mappings intact, since other commands or HotKey scopes may use them.
name=can add another alias but does not delete or rename shared aliases.
- System settings:
event=: any event offered by Choose System Event, matched without case sensitivity.minutes=: a whole number greater than zero for Idle/IdleEnd, default five on creation. Invalid for other events.filter=: program name for ProcessStart/ProcessEnd; drive match for USBIn/USBOut; positive monitor count for DisplayChange; network name for WifiChange. Other events reject a supplied filter. Empty matches any drive/display/network; process events require a nonempty executable name rather than a path. Filter text cannot contain a pipe, equals sign or physical line break. Process names use the existing whitespace-stripping rules.- Changing to an event that does not accept a filter discards the old inapplicable filter. Other omitted applicable settings retain their values.
- Clipboard settings:
event=Updated/Text: Updated fires on clipboard changes including empty/non-text content; Text uses the match settings.mode=Any/Contains/Exact/Regex, default Any for creation. Contains, Exact and Regex require a nonemptypattern=. The pattern is supplied as ordinary text; KeyBind performs its UTF-8 hex storage encoding. Invalid regex patterns fail before saving.case_sensitive=true/false, default true for creation. Applies to Text matching. Updated rejects supplied mode, pattern or case settings.
enable,disable,toggleanddeleterequire an existing target and accept only optional kind. Deletion requires no confirmation. These actions do not turn on the master or type switches. Repeating an unchanged edit or enable does not reset fired state or reload watchers.getaccepts optionalfield=, default task. Common fields:exists,kind,name,raw,task,enabled. Window fields:catcher,exact,always,grace. System fields:event,filter,minutes. Clipboard fields:event,mode,pattern,case_sensitive. Exists/enabled/exact/always/case_sensitive return Boolean values; minutes returns a number; other fields return text. Raw returns the complete saved key including its disabled marker. Name for Window returns the first friendly mapping, or its catcher when unmapped. A missing exists query returns False without error; other missing-target queries fail.- Related definition and optional mapping writes are staged and verified before replacement. Each file replacement is atomic; if a later replacement fails, earlier replacements are rolled back unless changed by another writer. This is not a crash-atomic transaction across two files. Unrelated comments, key order, indentation and file encoding are preserved. Runtime state is refreshed only after successful persistence. Window reload preserves the user's type switch, System edits invalidate existing caches, and Clipboard dispatch reads definitions directly. A running task can edit or delete its own trigger; deleted Window fired state is not restored afterwards, and remaining event scans skip definitions changed by earlier tasks.
TriggerControl(report)opens an HTML snapshot of all three trigger kinds; optional|kind=window/system/clipboardrestricts it. Every request replacesServer\Triggers.html. It uses the existing sharedServer\KeyBind.css, never overwritten. Search includes collapsed task/settings text. Kind and enabled-state filters run in the page. Counts describe the included snapshot. Expand Details for exact saved values. Reporting does not read clipboard contents, execute patterns or change runtime state.- @ExitValue: True for mutations, selected typed value for get, HTML path for report, or False on failure.
error: 0 success; 1 invalid/incomplete parameters; 2 missing, ambiguous or occupied target, including an unknown friendly name; 3 conflicting shared friendly mapping; 4 file failure; 5 report browser-launch failure. For file failure,extendedcounts files that could not be rolled back, normally zero. - Examples:
TriggerControl(new|<CLASS:Notepad++>|kind=window|name=Notepad++|task=Speak(Editor active))TriggerControl(edit|Notepad++|kind=window|exact=true|grace=30s)TriggerControl(new|Unsaved document|kind=window|catcher=Untitled - Notepad|task=Beep())TriggerControl(edit|Take a break|kind=system|event=Idle|minutes=20|task=Speak(Time for a break))TriggerControl(new|Movie started|kind=system|event=ProcessStart|filter=vlc.exe|task=Speak(Movie player started))TriggerControl(edit|Copied greeting|kind=clipboard|event=Text|mode=Regex|pattern="hello|world"|case_sensitive=false|task=Beep())TriggerControl(get|Copied greeting|kind=clipboard|field=pattern)TriggerControl(disable|Take a break|kind=system)TriggerControl(delete|Movie started|kind=system)TriggerControl(report)TriggerControl(report|kind=clipboard)
See also: HotKeyControl(), NewTrigger(), SentinelControl(), Triggers()
KeyBind()
Lastly, the KeyBind() command. Think of this as the Master command, the meta-command. You can alter almost any setting directly, using this command.
Most settings accept only particular values. For example, KeyBind(hooks|sausage) leaves the low-level hook setting unchanged because "sausage" is not an accepted value. See the settings list below for the values each setting accepts.
Note: The KeyBind() command does not accept "toggle" operations, only named instructions which set a specific state, e.g. "on".
There are built-in handlers for most of these commands, writing the ini and setting the new state live. These handlers are there to stop you shooting yourself in the foot, creating settings which would break your setup. Settings without a handler pass straight through as-supplied.
KeyBind()
- KeyBind(Setting|Value)
- Change almost any KeyBind setting directly. Supply the ini setting string (or alias), and the new value, separated, as usual, by a pipe.
- Settings with a handler below are checked according to their own rules. Live changes take effect immediately; other settings apply when next used or reloaded. Validation varies: for example, saved Tasks and date-format text are not checked for successful execution. Invalid values rejected by a handler get a brief notification with details.
- Setting names and aliases are case-insensitive. Aliases are alternate names for the same settings, particularly for longer settings. For on/off settings, true/false, yes/no, enabled/disabled and 1/0 are also accepted, case-insensitively. Blank values and toggle/switch requests are rejected by these handlers.
- Names without a handler are written directly to
[KeyBind]in the ini without checking their values or showing a success message. That includes names you invent and any spelling mistakes. They only have an effect if KeyBind reads that name later; saving a name does not create a new feature. - The keys
version,action_counter,backup_store,reload_active_title,reload_active_triggerandrecord_skip_passwordscannot be changed throughKeyBind(); attempting to set one returns False and shows a notification. - @ExitValue: True for an accepted setting; false when validation or a checked operation fails. Some setting-specific handlers do not check the ini write result, so True alone does not confirm the value was written (you can use a
*Control(get)command to verify, if required). - The runtime switches
usage_monitor,suspended,schedules_enabled,do_triggers,do_window_triggers,do_system_triggersanddo_clipboard_triggersrequire explicit on/off values. Blank values, toggle requests and unrecognised words are rejected. - Recognised settings with built-in handling:
Click a command to select it, then use
RunSelected()to run it. Examples can also change the related windows, clipboard contents, files or Windows settings described under each setting; hooks|show only displays information. Notes follow each setting's examples.abort_hotkey(HotKey)(alias:abort)Sets the HotKey you press to interrupt the running Task.
KeyBind(abort_hotkey|^!#{Pause})- Ctrl+Alt+Win+Pause.KeyBind(abort_hotkey|^!+#{F12})- Ctrl+Alt+Shift+Win+F12.
The HotKey cannot be blank. Registration must succeed; the previous HotKey is retained if the new combination is unavailable.
associate_kc_files(on/off)(alias:associate)KeyBind(associate_kc_files|on)- Associate .kc files with KeyBind so you can run them by opening them.KeyBind(associate_kc_files|off)- Remove the .kc file association with KeyBind.
block_time(0..60000 seconds)Sets the minimum time between window-triggered Tasks. After its Task returns, other window triggers are blocked for this many seconds; 0 prevents new pauses. Fractional seconds are accepted. Changing the setting does not cancel a pause already in progress.
KeyBind(block_time|0)- No configured block interval.KeyBind(block_time|30000)- 30000 seconds, the midpoint.KeyBind(block_time|60000)- 60000 seconds, the maximum.
capslock_info(on/off)(alias:caps)KeyBind(capslock_info|on)- Show a tooltip with the title and class of the window under the pointer when you press CapsLock.KeyBind(capslock_info|off)- Save window information without showing the tooltip.
case_sensitive(on/off)(alias:case)KeyBind(case_sensitive|on)- Require matching letter case when matching window titles.KeyBind(case_sensitive|off)- Match window titles regardless of letter case.
color_add_prefix(on/off)KeyBind(color_add_prefix|on)- Include the colour prefix, such as # for web hex colours.KeyBind(color_add_prefix|off)- Omit the colour prefix.
color_report_dimensions(on/off)KeyBind(color_report_dimensions|on)- Include the sampled window's position and dimensions in colour reports.KeyBind(color_report_dimensions|off)- Omit the window position and dimensions from colour reports.
color_report_file(file path)(alias:report)Sets the file where colour reports are saved when saving reports to a file is enabled.
KeyBind(color_report_file|@DataDir\Color Report.txt)- Use the KeyBind data directory.KeyBind(color_report_file|@Desktop\Color Report.txt)- Use the desktop.
The path must be non-blank and must not identify an existing folder. The output file itself need not exist.
color_report_to_file(on/off)KeyBind(color_report_to_file|on)- Save colour reports to the colour-report file.KeyBind(color_report_to_file|off)- Do not save colour reports to a file.
color_to_clipboard(on/off)Chooses whether sampled colours are copied to the clipboard. In persistent Mag sampling, copied samples become clipboard slots in the selected picker_color_format. In one-shot sampling, the selected colour is copied as text. The choice applies to subsequent samples, including samples from an open picker.
KeyBind(color_to_clipboard|on)- Copy subsequent sampled colours.KeyBind(color_to_clipboard|off)- Sample colours without copying them.
The tray checkbox follows the saved choice. Existing clipboard text and slots are retained. Colour report creation is controlled separately by create_color_report. In one-shot mode, a report sent to the clipboard replaces the single colour value; persistent sampling retains the colour slots and does not copy a full report over them.
commands_notify(on/off)Chooses whether KeyBind shows a tooltip when a *
Control()command changes a HotKey, Trigger, Sentinel or Schedule definition, for example when adding, editing, enabling, disabling or deleting one. The choice takes effect immediately.KeyBind(commands_notify|on)- Show notifications for changes made through *Control()commands.KeyBind(commands_notify|off)- Make those changes without their notification tooltips.
Use an explicit on/off value. Blank values, toggle requests and unrecognised words are rejected. The
KeyBind()command itself confirms this setting change.conflicts_report(file path)Stores a conflicts-report path, but the current import command writes its report to @DataDir\Server\KeyBindImportConflicts.log regardless of this setting. This command does not redirect that report. Preference loading deletes any existing file at the saved conflicts_report path; use a dedicated report path.
KeyBind(conflicts_report|@DataDir\HotKey Conflicts.txt)- Store this report path; current imports continue using their fixed report path.KeyBind(conflicts_report|@Desktop\HotKey Conflicts.txt)- Store this desktop path; current imports continue using their fixed report path.
The path must be non-blank and must not identify an existing folder. The output file itself need not exist.
copy_window_info(on/off)(alias:wininfo)KeyBind(copy_window_info|on)- Copy the title and class of the window under the pointer when CapsLock captures it.KeyBind(copy_window_info|off)- Capture window information without replacing the clipboard.
countdown_background_color(RGB colour)Sets the mini CountDown's normal background colour. Changes apply immediately to open timers and are saved for future timers. The full CountDown window uses the Windows dialog background. Completion flashing alternates the normal background with warning_color.
KeyBind(countdown_background_color|F0F0F0)- Use light grey.KeyBind(countdown_background_color|#202020)- Use dark grey.KeyBind(countdown_background_color|0xFFFFFF)- Use white.
Accepts the same RGB formats and range as countdown_text_color; the saved value is six uppercase hexadecimal digits.
countdown_complete(Task/sound-file path/blank)Sets what happens when a CountDown finishes: run a Task, play a sound file, or do nothing when the value is blank.
KeyBind(countdown_complete|)- Disable the default completion action.KeyBind(countdown_complete|Beep(880|dur=150ms))- Use a short completion tone.KeyBind(countdown_complete|Speak(CountDown complete.))- Speak at completion.KeyBind(countdown_complete|@DataDir\complete.wav)- Use this sound file, if it exists.
Saved in
[sounds]without checking whether the Task or file will run successfully. When the timer completes, an existing file is played as sound; other text is executed as a Task. Supply one command here. A ** separator starts another command in the calling Task rather than storing a completion chain.countdown_corner_radius(0..23 pixels)Sets how rounded the mini CountDown's corners are. Zero gives square corners; 23 gives semicircular ends. The choice applies immediately to open mini timers and is saved for future timers.
KeyBind(countdown_corner_radius|0)- Use square corners.KeyBind(countdown_corner_radius|6)- Use the default rounded corners.KeyBind(countdown_corner_radius|23)- Use semicircular ends.
Use a whole number from 0 to 23, half the mini timer's height. Decimal values and values outside that range are rejected.
countdown_start(Beep parameters)Sets the tone you hear when a CountDown starts.
KeyBind(countdown_start|372|50)- Use the default frequency and duration.KeyBind(countdown_start|880|150)- 880 Hz for 150 ms.KeyBind(countdown_start|440|300)- 440 Hz for 300 ms.
Saved in
[sounds]. Supply Beep() parameters without theBeep()wrapper, whitespace, @Tokens or a Task chain. The value cannot be empty. Frequency comes first; bare duration values are milliseconds, or use dur= with ms/s/m/h/d units. Parameter names, units and waveform names are case-insensitive. The Beep parser rejects malformed syntax but substitutes its defaults or clamps valid numbers outside its supported ranges.countdown_stop(Beep parameters)Sets the tone you hear when a CountDown is stopped.
KeyBind(countdown_stop|245|50)- Use the default frequency and duration.KeyBind(countdown_stop|880|150)- 880 Hz for 150 ms.KeyBind(countdown_stop|440|300)- 440 Hz for 300 ms.
Saved in
[sounds]. Supply Beep() parameters without theBeep()wrapper, whitespace, @Tokens or a Task chain. The value cannot be empty. Frequency comes first; bare duration values are milliseconds, or use dur= with ms/s/m/h/d units. Parameter names, units and waveform names are case-insensitive. The Beep parser rejects malformed syntax but substitutes its defaults or clamps valid numbers outside its supported ranges.countdown_text_color(RGB colour)Sets the normal digit colour in full and mini CountDown windows. Open timers update immediately. A completed timer keeps its current flashing phase, using the new normal text colour where appropriate.
KeyBind(countdown_text_color|000000)- Use black digits.KeyBind(countdown_text_color|#FFFFFF)- Use white digits.KeyBind(countdown_text_color|0x204060)- Use a dark blue RGB colour.
Accepts six hexadecimal digits RRGGBB, optionally prefixed with #; 0x followed by one to six hexadecimal digits; or a decimal RGB integer from 0 to 16777215. A string of exactly six digits is always hexadecimal. Colour names, incomplete values and out-of-range values are rejected. The colour is saved as six uppercase hexadecimal digits without a prefix.
countdown_transparency(0..95 percent)Sets how transparent the mini CountDown window is, including its digits. Zero is fully opaque; 95 is almost transparent. The full CountDown window remains opaque. Changes apply immediately to open mini timers and are saved for future timers.
KeyBind(countdown_transparency|0)- Make the mini timer fully opaque.KeyBind(countdown_transparency|33)- Use the default 33% transparency.KeyBind(countdown_transparency|75)- Make it 75% transparent.
Use a whole number from 0 to 95. Decimal values and values outside that range are rejected.
create_color_report(on/off)Chooses whether colour sampling also creates a report containing all nine colour conversions and, when enabled, the sampled window's details. The choice applies to subsequent samples, including samples from an open picker, and updates the tray checkbox.
KeyBind(create_color_report|on)- Create reports for subsequent colour samples.KeyBind(create_color_report|off)- Sample colours without generating reports.
color_report_to_file selects file output; color_report_file selects its path, and open_report_on_sample controls automatic opening. For one-shot clipboard report output, color_to_clipboard must also be on. Persistent sampling appends reports only when file output is enabled. Existing report files and already collected samples are retained.
date_format(date format)(alias:date)Sets the date format inserted into your active document by
Date().KeyBind(date_format|@Year-@Mon-@MDay)- Year-month-day.KeyBind(date_format|@MDay/@Mon/@Year)- Day/month/year.KeyBind(date_format|@Year@Mon@MDay)- Compact year-month-day.
Must be non-blank. The confirmation displays the expanded date.
debug_level(off/0..10)(aliases:debug,debugging)KeyBind(debug_level|off)- Disable debugging.KeyBind(debug_level|0)- Disable debugging (numeric form).KeyBind(debug_level|1)- Set debug level 1.KeyBind(debug_level|2)- Set debug level 2.KeyBind(debug_level|3)- Set debug level 3.KeyBind(debug_level|4)- Set debug level 4.KeyBind(debug_level|5)- Set debug level 5.KeyBind(debug_level|6)- Set debug level 6.KeyBind(debug_level|7)- Set debug level 7.KeyBind(debug_level|8)- Set debug level 8.KeyBind(debug_level|9)- Set debug level 9.KeyBind(debug_level|10)- Set debug level 10.
Higher levels produce more diagnostic output. Both off and 0 disable debugging.
debug_log(file path)(alias:debuglog)Sets the file where KeyBind writes diagnostic messages when debugging is enabled.
KeyBind(debug_log|@DataDir\debug.log)- Use the KeyBind data directory.KeyBind(debug_log|@Desktop\debug.log)- Use the desktop.
The path must be non-blank and must not identify an existing folder. The output file itself need not exist.
dialog_fontandinputbox_font(font name|size|weight|attribute)dialog_fontsets the font for newly created dialogs and labels.inputbox_fontsets the font for newly created input controls. Both accept the same font values and reject the same invalid values. Existing windows and controls keep their current fonts.Supply up to four fields, in this order:
- Name: an installed font family name, such as
ConsolasorSegoe UI. Names match without case sensitivity. A name absent from the system font list rejects the command without saving. - Size: 6 to 72 points, including decimal sizes such as
10.5. - Weight: an integer from 100 to 900. Normal is
400; bold is700. - Attribute:
0for normal,2for italic,4for underline or8for strikeout. Add the flags to combine them, for example6for italic and underline. Valid values are 0, 2, 4, 6, 8, 10, 12 and 14.
Use
-to retain a field's current value. Omitted trailing fields also retain their values. If a field has no usable saved value, its normal font default is retained. Blank supplied fields are rejected; use-instead. Supplying only-values leaves the font unchanged. An invalid field or more than four fields rejects the whole command without saving any part of it.KeyBind(dialog_font|Segoe UI|9.5|400|0)- Set all four dialog-font values.KeyBind(inputbox_font|Consolas|11|700|2)- Set all four input-font values: 11-point bold italic Consolas.KeyBind(dialog_font|Segoe UI)- Change only the name; retain size, weight and attribute.KeyBind(inputbox_font|-|10.5)- Change only the size.KeyBind(dialog_font|-|-|700)- Change only the weight.KeyBind(inputbox_font|-|-|-|2)- Change only the attribute to italic.KeyBind(inputbox_font|-|-|-|0)- Clear the attributes without changing the name, size or weight.
Each pattern works with either setting name. Your selected font values are saved for future use. The other font preference is not changed.
- Name: an installed font family name, such as
disabled_color(RGB colour)Sets the colour used for disabled HotKey and Window Trigger entries. Saves six uppercase hexadecimal digits and updates the open Config Editor lists. Accepts the same RGB formats and limits as
countdown_text_color.KeyBind(disabled_color|#A2A2A2)- Use grey for disabled entries.
do_clipboard_triggers(on/off)Switches Tasks triggered by clipboard changes. The trigger master must also be on, and KeyBind must not be suspended, for those Tasks to fire. This choice does not change individual ClipBoard Trigger definitions. If a matching Task disables these triggers, later matching Tasks for that clipboard change are skipped.
KeyBind(do_clipboard_triggers|on)- Enable ClipBoard Triggers.KeyBind(do_clipboard_triggers|off)- Disable ClipBoard Triggers.
Clipboard copying and pasting remain available. A Task already executing continues. The saved category choice is retained while the trigger master is off.
do_system_triggers(on/off)Switches System Triggers such as idle, network, process, device and session events. The trigger master must also be on, and KeyBind must not be suspended, for these triggers to fire. Turning this category off discards pending system events; system events received while the category or trigger master is off are discarded too.
KeyBind(do_system_triggers|on)- Enable System Triggers.KeyBind(do_system_triggers|off)- Disable System Triggers and discard their pending events.
Enabling the category resets its polling baselines. Initial checks establish current state instead of treating changes during the disabled interval as new events. Individual trigger definitions retain their enabled flags. A Task already executing continues.
do_triggers(on/off)Switches Window, System and ClipBoard Triggers together. Each category keeps its own on/off choice: switching the master back on resumes only categories whose own switches are on. Individual trigger definitions keep their enabled flags. HotKeys, Schedules and Sentinels have separate controls.
KeyBind(do_triggers|on)- Allow the enabled trigger categories to fire.KeyBind(do_triggers|off)- Stop all three categories from firing.
Changes take effect immediately. A Task already executing continues. Disabling System Triggers through this master discards pending system events. Re-enabling a category uses its normal startup checks; it does not replay a history of events from the disabled interval. Suspension can also prevent triggers from firing.
do_window_triggers(on/off)Switches Window Triggers without changing System or ClipBoard Triggers. The trigger master must also be on, and KeyBind must not be suspended, for Window Triggers to fire. Enabling this category makes KeyBind check the active window afresh, so a matching trigger can run on the next check.
KeyBind(do_window_triggers|on)- Enable Window Triggers.KeyBind(do_window_triggers|off)- Disable Window Triggers.
The category choice is saved even when the master is off. Individual trigger definitions and window-wait queues are retained; disabling this category also pauses the main-loop processing of window-wait queues. It does not abort a Task already executing.
editor(existing .exe path)(alias:edit)Sets the text editor KeyBind opens for editing files.
KeyBind(editor|C:\Windows\System32\notepad.exe)- Use Windows Notepad, if installed at this path.KeyBind(editor|@ProgramFiles\Notepad++\notepad++.exe)- Use Notepad++, if installed at this path.
The selected executable must already exist. Adjust the example path to match the installation; bare executable names that rely on PATH are rejected.
fixed_trigger_delay(on/off)(alias:fixed)KeyBind(fixed_trigger_delay|on)- Let a window trigger's grace period expire even while its window stays active.KeyBind(fixed_trigger_delay|off)- Restart the grace period while the window stays active.
from_address(text/blank)Sets the sender and reply address. Saves encrypted text in
[mail]; an empty value clears the saved field without deleting its key. Text is not checked for server availability, valid addresses or accepted credentials. ASCII-only.KeyBind(from_address|sender@example.com)- Save this example value; replace it with your own.KeyBind(from_address|)- Clear the saved field.
- Note: Mail text settings use the same reversible encryption functions as all corz.org apps, so you can copy & paste your mail settings from, for example, CorzSpaZio. The encryption obscures stored values; it is not meant to be a transport-secure encryption algorithm (KeyBind pages use SHA-256 to transport details across the wire); simply to prevent causal snooping, as your user account is considered to be secure storage. Plain text values in your ini are also perfectly fine, if you must.
Note: Non-ASCII values are rejected by the encryption function. If you must use weird shit in your mail settings, enter it manually into your ini file, instead.
from_name(text/blank)Sets the sender display name. Saves encrypted text in
[mail]; an empty value clears the saved field without deleting its key. Text is not checked for server availability, valid addresses or accepted credentials. Again, ASCII-only.KeyBind(from_name|KeyBind Alerts)- Save this example value; replace it with your own.KeyBind(from_name|)- Clear the saved field.
history_on_top(on/off)Keeps the Run History window above other applications, or allows other windows to cover it. Updates the open window and its On Top checkbox, and saves the choice for future Run History windows.
KeyBind(history_on_top|on)- Keep Run History above other applications.KeyBind(history_on_top|off)- Allow other windows to cover Run History.
idle_ignore(PCRE patterns/blank)(alias:idle)Prevents Idle and IdleEnd Tasks from firing while a matching program or window is in the foreground, for example while you watch a film.
KeyBind(idle_ignore|)- Clear the ignore patterns.KeyBind(idle_ignore|(?i)^notepad\.exe$;)- Ignore Notepad, regardless of letter case; retain the trailing semicolon for this single pattern.KeyBind(idle_ignore|(?i)^notepad\.exe$;(?i)^vlc\.exe$)- Ignore either executable, regardless of letter case.
Accepts semicolon-separated PCRE patterns matched against the foreground executable filename or window title. For a single pattern, include a trailing semicolon as shown. Matching is case-sensitive unless the pattern includes (?i); use \. for a literal dot and ^...$ for a complete filename. Invalid patterns are saved but skipped when the list loads. Options > Runtime & Speech also accepts executable and shortcut files by drag-and-drop into Idle Ignores.
import_always_overwrites_tasks(on/off)Controls the conflict-overwrite question for imported HotKeys, Triggers, Sentinels and Schedules. Import validation and dangerous-command confirmation remain separate; enabling this preference does not bypass them.
KeyBind(import_always_overwrites_tasks|on)- Overwrite conflicting Tasks and schedules during import without asking.KeyBind(import_always_overwrites_tasks|off)- Ask before overwriting conflicting Tasks and schedules during import.
info_file(file path)(alias:info)Sets the file where KeyBind saves the window information captured with CapsLock.
KeyBind(info_file|@DataDir\KeyBind_Window_Info.txt)- Use the KeyBind data directory.KeyBind(info_file|@Desktop\KeyBind_Window_Info.txt)- Use the desktop.
The path must be non-blank and must not identify an existing folder. The output file itself need not exist.
keep_countdown(on/off)Chooses whether a finished CountDown stays open when it has an enabled completion Task or sound. With on, the timer stays open and flashes while its completion action runs. With off, it closes before running that action. A timer without an enabled completion action stays open and flashes with either setting.
KeyBind(keep_countdown|on)- Keep finished timers open when their completion actions run.KeyBind(keep_countdown|off)- Close them before running their completion actions.
The choice is saved and applies when any timer next finishes, including timers already running. It does not reopen timers that have closed or close timers that have already finished. Use an explicit on/off value; blank, toggle and unrecognised values are rejected.
keybind_sounds(on/off)Switches the notification tones heard when a CountDown starts or is stopped. The saved choice applies to subsequent notifications.
KeyBind(keybind_sounds|on)- Play the configured CountDown start and stop tones.KeyBind(keybind_sounds|off)- Start and stop CountDowns without those tones.
The tones are set by countdown_start and countdown_stop. Explicit
Beep()commands, sound-file playback, speech and a CountDown completion Task use their own settings. Use an explicit on/off value; blank, toggle and unrecognised values are rejected.keybind_volume(0..100)Sets the volume of KeyBind's CountDown start and stop notification tones. Use a whole number from 0 to 100: 0 is silent, 50 halves each tone's configured volume, and 100 uses its full configured volume. The choice takes effect on the next tone.
KeyBind(keybind_volume|0)- Silence the notification tones.KeyBind(keybind_volume|50)- Play them at half their configured volume.KeyBind(keybind_volume|100)- Play them at their full configured volume.
Each tone's vol= value is multiplied by this percentage. This setting does not change Windows volume. Decimal values and values outside 0-100 are rejected.
line_feed(LF/CRLF/CR)KeyBind(line_feed|LF)- Line feed.KeyBind(line_feed|CRLF)- Carriage return followed by line feed.KeyBind(line_feed|CR)- Carriage return.
Selects the line breaks KeyBind inserts into your active document, copied text and generated file content. This includes literal
\ninText(),Copy(),FileWriteData()andFileAppendData(), and separators between pasted clipboard slots. Existing line breaks in captured text, files and stored slots are preserved.listview_allows(comma-separated extensions)Sets the file types a ListView viewer accepts from a Windows drop, as a comma-separated extension list. Drops of other types are skipped. A blank value restores the default list (txt). The value applies to the next drop.
KeyBind(listview_allows|txt,log,md)- Accept plain-text drops.KeyBind(listview_allows|)- Restore the default list.
listview_liveview(on/off)Sets Auto-launch on selection in all open file ListView windows and saves the default for future file viewers. When enabled, selecting a single file opens it in its default application. With Live Update enabled, newly added files are selected and opened when detected. Opening a new file viewer also opens its first displayed file. Enabling this setting in an existing viewer does not itself open its current selection. This setting does not enable Live Update or alter lists of plain text.
KeyBind(listview_liveview|on)- Open files when selected in file viewers.KeyBind(listview_liveview|off)- Require a double-click to open a selected file.
listview_max_file(MiB, 0.1 or more)Sets the maximum size of a file dropped onto a ListView viewer, in MiB. Larger drops are skipped with a notification. The value applies to the next drop.
KeyBind(listview_max_file|1)- Accept drops up to 1 MiB.KeyBind(listview_max_file|5)- Accept drops up to 5 MiB.
listview_notify(on/off)Switches notifications for source changes in
ListView()windows. Each viewer must also have Live Update enabled to detect changes. All open viewers share this notification choice; changing it updates their notification checkboxes immediately. Switching it off also stops active flashes.KeyBind(listview_notify|on)- Notify you when a viewer's live source changes.KeyBind(listview_notify|off)- Stop ListView change alerts and any current flashes.
The choice is saved for future viewers. Use an explicit on/off value; blank values, toggle requests and unrecognised words are rejected.
listview_notify_offtime(0..2147483647 milliseconds)Sets how long the normal list colour is shown between flashes. Zero removes this pause. The value is saved and used by the next flash; a flash already running keeps its original timing.
KeyBind(listview_notify_offtime|0)- Use no configured pause between flashes.KeyBind(listview_notify_offtime|50)- Use the default 50 ms of normal colour.KeyBind(listview_notify_offtime|250)- Show normal colour for a quarter of a second between flashes.
Use a whole number from 0 to 2147483647. Notifications must be enabled and the selected method must include flashing.
listview_notify_ontime(1..2147483647 milliseconds)Sets how long the warning colour remains visible during each ListView flash. The value is saved and used by the next flash; a flash already running keeps its original timing.
KeyBind(listview_notify_ontime|100)- Show the warning colour for 100 ms per flash.KeyBind(listview_notify_ontime|150)- Use the default 150 ms.KeyBind(listview_notify_ontime|500)- Show it for half a second per flash.
Use a whole number from 1 to 2147483647. Notifications must be enabled and the selected method must include flashing.
listview_notify_repeat(1..2147483647)Sets the number of complete warning-colour/normal-colour cycles for each ListView change alert. The value is saved and used by the next flash; a flash already running keeps its original repetition count.
KeyBind(listview_notify_repeat|1)- Flash once for each change alert.KeyBind(listview_notify_repeat|3)- Use the default three flashes.KeyBind(listview_notify_repeat|5)- Flash five times.
Use a whole number from 1 to 2147483647. Notifications must be enabled and the selected method must include flashing.
listview_notify_type(Tooltip/Flash/Tooltip+Flash/Full Flash/ToolTip+Full Flash)Chooses how live ListView source changes are announced. Flash colours the changed items using warning_color; Full Flash colours the whole list. Tooltip shows a brief message identifying the changed list. The selected method applies to subsequent change alerts in open and future viewers.
KeyBind(listview_notify_type|Tooltip)- Show a tooltip without flashing.KeyBind(listview_notify_type|Flash)- Flash the changed items.KeyBind(listview_notify_type|Tooltip+Flash)- Show a tooltip and flash the changed items.KeyBind(listview_notify_type|Full Flash)- Flash the whole list.KeyBind(listview_notify_type|ToolTip+Full Flash)- Show a tooltip and flash the whole list.
Names are case-insensitive; one of these five names is required. Selecting a method does not enable notifications or Live Update. An alert already flashing keeps the method with which it began.
listview_on_top(on/off)Keeps all open
ListView()windows above other applications, or allows other windows to cover them. Updates their On Top checkboxes and saves the default for future ListView windows. Individual viewers can subsequently use their own On Top checkbox.KeyBind(listview_on_top|on)- Keep ListView windows above other applications.KeyBind(listview_on_top|off)- Allow other windows to cover ListView windows.
log_viewer(existing .exe path)(alias:viewer)Sets the program KeyBind opens to display log files.
KeyBind(log_viewer|C:\Windows\System32\notepad.exe)- Use Windows Notepad, if installed at this path.KeyBind(log_viewer|@ProgramFiles\Notepad++\notepad++.exe)- Use Notepad++, if installed at this path.
The selected executable must already exist. Adjust the example path to match the installation; bare executable names that rely on PATH are rejected.
loop_delay(10..250 ms)(aliases:loopdelay,loop)Controls how frequently KeyBind checks for work. Smaller values improve responsiveness but use more CPU; larger values reduce CPU use but can delay processing.
KeyBind(loop_delay|25)- Check for work to do every 25ms (the default; low CPU usage, excellent responsiveness).KeyBind(loop_delay|10)- 10ms, extreme responsiveness, higher CPU usage.KeyBind(loop_delay|100)- Very Low CPU usage, slower responsiveness.KeyBind(loop_delay|250)- Very slow responsiveness; negligible CPU usage.
low_level_hooks(on/off/raw/default/show)(alias:hooks)Enables mouse clicks and wheel movements to trigger KeyBind Tasks. Switching this off leaves all the usual mouse commands, Mag() colour picker and mouse recording available; this only affects HotKeys triggered by these things.
KeyBind(low_level_hooks|on)- Enable click and wheel triggers.KeyBind(low_level_hooks|off)- Disable click and wheel triggers.KeyBind(low_level_hooks|raw)- Select Raw Input.KeyBind(low_level_hooks|default)- Select hook input.KeyBind(low_level_hooks|show)- Display the current enabled state and input source.
rawanddefaultselect the input source; they do not switch the master enabled state on. Useonseparately, if required.mail_pass(text/blank)Sets the SMTP password. Leading and trailing spaces and letter case are retained. Saves encrypted text in
[mail]; an empty value clears the saved field without deleting its key. Text is not checked for server availability, valid addresses or accepted credentials. ASCII-only.KeyBind(mail_pass|example-password)- Save this example value; replace it with your own.KeyBind(mail_pass|)- Clear the saved field.
mail_port(1..65535)Sets the SMTP connection port. Requires a whole number from 1 to 65535; the setting alone does not select SSL.
KeyBind(mail_port|465)- Use port 465.KeyBind(mail_port|25)- Use port 25.
mail_priority(Highest/High/Normal/Low/Lowest)Sets the priority headers used for subsequent mail. Names are case-insensitive; other values are rejected. The recipient's mail software decides how to display or use the headers.
KeyBind(mail_priority|Highest)- Use highest priority.KeyBind(mail_priority|High)- Use high priority.KeyBind(mail_priority|Normal)- Use normal priority.KeyBind(mail_priority|Low)- Use low priority.KeyBind(mail_priority|Lowest)- Use lowest priority.
mail_ssl(on/off)Chooses implicit SSL for the SMTP connection. This does not change mail_port or encrypt
KeyBind()HTTP requests. Blank, toggle and unrecognised values are rejected.KeyBind(mail_ssl|on)- Use implicit SSL when sending mail.KeyBind(mail_ssl|off)- Do not request implicit SSL.
mail_user(text/blank)Sets the SMTP login name. Blank disables SMTP authentication. Saves encrypted text in
[mail]; an empty value clears the saved field without deleting its key. Text is not checked for server availability, valid addresses or accepted credentials. ASCII-only.KeyBind(mail_user|user@example.com)- Save this example value; replace it with your own.KeyBind(mail_user|)- Clear the saved field.
max_clipboard_slots(1..1000)Sets how many clipboard slots KeyBind retains for
PasteSlot(),CopyAppend()/CutAppend(),ClipBoardSlots()and persistent colour sampling. Reducing the limit immediately discards the oldest excess slots and keeps the newest. Increasing it allows more future slots; discarded slots are not restored.ClipBoardSlots()sees the revised list on its next update.KeyBind(max_clipboard_slots|1)- Retain only the newest slot.KeyBind(max_clipboard_slots|100)- Use the default one-hundred-slot limit.KeyBind(max_clipboard_slots|1000)- Allow up to one thousand slots.
Use a whole number from 1 to 1000. Blank, decimal and out-of-range values are rejected. A failed save leaves both the live limit and existing slots unchanged. Trimming slot rows does not replace the current Windows clipboard text.
max_history_file(MiB, at least 0.1)(alias:maxhistoryfile)Limits the size of the saved Task run history. A larger limit keeps more past entries.
KeyBind(max_history_file|0.1)- Minimum: 0.1 MiB.KeyBind(max_history_file|1)- 1 MiB, the default.KeyBind(max_history_file|10)- 10 MiB.
Fractional sizes are accepted. There is no upper size limit. Reducing the limit will immediately discard the oldest retained run-history entries beyond the new limit.
Note: The history viewer will load only the most recent entiries, and lazy-load older entries if you scroll, so the size of your history file has almost no impact on its operation.
max_log_size(MiB, 0 or more)(alias:maxlog)Sets how large a debug log can grow before KeyBind starts another log file. Use 0 to keep writing to one file without a size limit.
KeyBind(max_log_size|0)- Unlimited log size.KeyBind(max_log_size|1)- 1 MiB.KeyBind(max_log_size|10)- 10 MiB.
Fractional sizes are accepted. There is no upper size limit.
message_text_size(points, 1 or more)KeyBind(message_text_size|1)- Minimum accepted size: 1 point.KeyBind(message_text_size|12)- 12-point message text.KeyBind(message_text_size|24)- 24-point message text.
Sets the text size in message dialogs opened after the change. Use a whole number of points; there is no upper size limit.
missed_minutes(minutes, 0 or more)KeyBind(missed_minutes|0)- Zero minutes.KeyBind(missed_minutes|5)- Five minutes.KeyBind(missed_minutes|60)- Sixty minutes.
When KeyBind starts or your computer wakes, warn about recurring schedules missed within this many minutes. Set 0 to suppress these recurring-schedule warnings. This does not change warnings for one-date or custom schedules, or delays detected while KeyBind is running. Use a whole number of minutes; there is no upper limit.
mouse_delay(0..1000 ms)Sets the pause between repeated
MouseClick()clicks and the default interval betweenMouseWheel()notches. AMouseWheel()command can override its interval. This setting does not controlMouseMove()speed or how long a mouse button stays down.KeyBind(mouse_delay|0)- Minimum: no configured delay.KeyBind(mouse_delay|500)- Midpoint: 500 ms.KeyBind(mouse_delay|1000)- Maximum: 1000 ms.
Whole numbers only.
mouse_pos_scheme(absolute/relative/window)(aliases:mouse,mousepos)Sets how
MouseMove()andMouseClick()interpret coordinates when the command does not specify a scheme: absolute uses screen coordinates, relative uses offsets from the current pointer position, and window uses offsets from the active window's top-left corner.KeyBind(mouse_pos_scheme|absolute)- Absolute coordinates.KeyBind(mouse_pos_scheme|relative)- Relative coordinates.KeyBind(mouse_pos_scheme|window)- Window coordinates.
notify_on_hooks(on/off)KeyBind(notify_on_hooks|on)- Show a tooltip when the mouse listener pauses or resumes.KeyBind(notify_on_hooks|off)- Hide mouse-listener pause and resume tooltips.
open_report_on_sample(on/off)KeyBind(open_report_on_sample|on)- Open the colour report after a sample, or after persistent sampling stops.KeyBind(open_report_on_sample|off)- Collect samples without automatically opening the colour report.
persistent_hotkey_window(on/off)KeyBind(persistent_hotkey_window|on)- Keep the Current HotKeys window open when you click elsewhere.KeyBind(persistent_hotkey_window|off)- Close the Current HotKeys window when it loses focus.
picker_color_format(full format name or number 1..9)Sets and saves the format used for sampled colour text. The choice applies immediately and remains selected after the Task finishes, including a change made inside a nested Task. Names are case-insensitive. Use a full name below or its corresponding number; abbreviations and ambiguous partial names are rejected.
KeyBind(picker_color_format|RGB Int)- 1: use RGB Int output.KeyBind(picker_color_format|AutoIt RGB)- 2: use AutoIt RGB output.KeyBind(picker_color_format|AutoIt BGR)- 3: use AutoIt BGR output.KeyBind(picker_color_format|Delphi Hex)- 4: use Delphi Hex output.KeyBind(picker_color_format|Visual C++ Hex)- 5: use Visual C++ Hex output.KeyBind(picker_color_format|RGB Float)- 6: use RGB Float output.KeyBind(picker_color_format|Hue/Sat/Lum)- 7: use Hue/Sat/Lum output.KeyBind(picker_color_format|CMYK)- 8: use CMYK output.KeyBind(picker_color_format|Web Hex)- 9: use Web Hex output.KeyBind(picker_color_format|1)- Select RGB Int by number.KeyBind(picker_color_format|9)- Select Web Hex by number.
The tray selection follows the saved format. If the clipboard still contains exactly the last single colour copied by KeyBind, that text is converted to the selected format. Other clipboard contents and existing slot contents are preserved. Future samples use the selected format; colour reports continue to include all nine conversions. Use
SwitchColorFormat()for a temporary change within the current Task.position_saving_method(absolute/desktop/workarea)Chooses how KeyBind saves window X/Y coordinates. The choice applies the next time a window position is saved; it does not move open windows or rewrite previously saved coordinates. Names are case-insensitive.
KeyBind(position_saving_method|absolute)- Save the X/Y coordinates as pixel values.KeyBind(position_saving_method|desktop)- Save expressions relative to the nearest horizontal and vertical edges of the window's monitor, including the space occupied by taskbars.KeyBind(position_saving_method|workarea)- Save expressions relative to the nearest horizontal and vertical edges of the monitor's usable work area, excluding visible taskbars.
A coordinate exactly halfway between the relevant edges is saved as their midpoint. Where the saving command supplies no window position, KeyBind uses the active window's monitor. Saved expressions are evaluated against the active window's monitor when the position is restored; existing pixel coordinates remain pixel coordinates regardless of this setting.
random_seed(expression)(alias:seed)KeyBind(random_seed|12345)- Use a fixed numeric seed expression.KeyBind(random_seed|@Min*@Sec*@MSec)- Use the minute, second and millisecond expression.
Sets the seed expression used to generate random file names. KeyBind accepts any non-blank expression here; an invalid expression can fail when a random name is requested.
record_click_ms(0..10000 milliseconds)Sets the longest mouse-button press that counts as a simple click when pointer movement stays within record_jitter_px. A longer stationary press is captured as separate button-down and button-up events. The selected value is used when a button is released, including a press already in progress.
KeyBind(record_click_ms|0)- Classify a stationary press as a simple click only if its measured duration is zero.KeyBind(record_click_ms|450)- Use the default 450 ms click limit.KeyBind(record_click_ms|1000)- Allow stationary presses lasting up to one second to count as clicks.
The limit includes the specified duration. Mouse movement is also checked; record_jitter_px and record_drag_px determine the movement classification. The change is saved for future recordings. Use a whole number within the stated range; blank, decimal and out-of-range values are rejected.
record_coords(absolute/window)Sets whether recorded mouse positions refer to the screen or to the recorded window, so a recording can follow a moved window. This reloads all recorder preferences from the ini, replacing temporary
RecorderControl()choices.KeyBind(record_coords|absolute)- Record absolute screen coordinates.KeyBind(record_coords|window)- Record coordinates relative to the window.
record_drag_px(0..500 pixels)Sets the movement threshold for recording a button press and release as a drag. The recorder checks the larger horizontal or vertical distance. Movement must first exceed record_jitter_px; it then counts as a drag when it reaches or exceeds this threshold. Movement between those two thresholds is captured as a click.
KeyBind(record_drag_px|0)- Treat movement beyond the jitter tolerance as a drag.KeyBind(record_drag_px|8)- Use the default eight-pixel drag threshold.KeyBind(record_drag_px|20)- Require at least twenty pixels of movement after exceeding the jitter tolerance.
The choice applies when a button is released, including a press already in progress, and is saved for future recordings. Jitter and drag thresholds can be set independently. Use a whole number within the stated range; blank, decimal and out-of-range values are rejected.
record_hotkey(HotKey/blank)(aliases:record,recordkey)KeyBind(record_hotkey|^!#{F9})- Ctrl+Alt+Win+F9.KeyBind(record_hotkey|^!+#{F9})- Ctrl+Alt+Shift+Win+F9.KeyBind(record_hotkey|)- Disable the recorder HotKey.
Changing this setting changes the HotKey that starts and stops recording; the tray recording command remains available.
record_hotkeys(embed/raw)Controls what a recording contains when you activate a KeyBind HotKey: embed records its Task commands; raw records the keys you pressed. This reloads all recorder preferences from the ini, replacing temporary
RecorderControl()choices.KeyBind(record_hotkeys|embed)- Embed the fired KeyBind Task.KeyBind(record_hotkeys|raw)- Keep the HotKey keystrokes.
record_jitter_px(0..500 pixels)Sets how far the pointer may move during a button press and still count as staying in one place. The larger of the horizontal and vertical distances is compared with this value; the limit is inclusive. This tolerance is also used when combining nearby repeated clicks while generating the script.
KeyBind(record_jitter_px|0)- Require the same pointer position for the stationary-press classification.KeyBind(record_jitter_px|6)- Use the default six-pixel tolerance.KeyBind(record_jitter_px|12)- Allow up to twelve pixels of movement on either axis.
The stationary-press check takes precedence over the drag threshold. Changing this value affects subsequent button releases and repeated-click grouping when the script is generated. It is saved for future recordings. Use a whole number within the stated range; blank, decimal and out-of-range values are rejected.
record_max_events(100..100000 events)Limits the number of raw events captured in one recording. Raw events include keystrokes, mouse actions and other captured records; the count is not the number of commands in the generated script. When another event would exceed the limit, capture pauses and the recorder shows REC BUFFER FULL - stop to edit. Stop the recording to generate and optionally edit the script.
KeyBind(record_max_events|100)- Allow up to one hundred captured events.KeyBind(record_max_events|5000)- Use the default five-thousand-event limit.KeyBind(record_max_events|100000)- Allow up to one hundred thousand captured events.
Changing the limit does not discard captured events. Lowering it to the current count or below takes effect on the next attempted event. Raising it after buffer-full pause does not automatically resume recording. The choice is saved for future recordings. Use a whole number within the stated range; blank, decimal and out-of-range values are rejected.
record_min_pause_ms(0..120000 milliseconds)Sets the shortest gap between captured events that becomes a
Pause()command in the generated recording. Gaps below this threshold do not producePause()commands. The threshold is used when the script is generated, so changing it can alter the pauses produced from events already captured.KeyBind(record_min_pause_ms|0)- Produce aPause()for every gap, including zero-length gaps.KeyBind(record_min_pause_ms|750)- Use the default threshold of three quarters of a second.KeyBind(record_min_pause_ms|2000)- Include pauses only for gaps of at least two seconds.
Included gap durations are rounded down to a multiple of 100 ms. Zero does not suppress pauses. The selected threshold is saved for future recordings. Use a whole number within the stated range; blank, decimal and out-of-range values are rejected.
record_settle_ms(0..10000 milliseconds)Sets the initial period after recording starts during which keyboard and mouse input is ignored. This gives you time to release the recording HotKey and prepare your first action. The period is measured from the original recording start time; changing it during recording does not start a new delay.
KeyBind(record_settle_ms|0)- Start accepting input without an initial settle delay.KeyBind(record_settle_ms|350)- Use the default 350 ms settle period.KeyBind(record_settle_ms|1000)- Ignore input during the first second of recording.
The change affects subsequent capture checks in a running recording and is saved for future recordings. Use a whole number within the stated range; blank, decimal and out-of-range values are rejected.
record_stoplag_ms(0..10000 milliseconds)Sets how far backward from stopping the recorder looks for trailing keystroke echoes of the recording-toggle key. Matching key events at the end of the recording are removed only while they are within this time window. This helps keep the key used to stop recording out of the saved script.
KeyBind(record_stoplag_ms|0)- Remove only matching trailing echoes timestamped at the stopping instant.KeyBind(record_stoplag_ms|800)- Use the default 800 ms look-back window.KeyBind(record_stoplag_ms|1500)- Allow a look-back window of one and a half seconds.
This is a look-back window, not a delay after recording stops. It is read when stopping trims the captured events. Trimming stops at the first different event or an older matching event. The choice is saved for future recordings. Use a whole number within the stated range; blank, decimal and out-of-range values are rejected.
- Note: Each numeric recorder setting (above) saves and applies only that option. Other temporary
RecorderControl()choices remain in effect. Invalid values and failed saves leave the saved preference and live option unchanged. record_skip_passwords cannot be changed throughKeyBind(). recorder_edit(on/off)Selects the editor or direct file saving when recording stops normally. A stop operation that requests neither editing nor saving overrides this preference. Changing it reloads all recorder preferences, replacing temporary
RecorderControl()choices.KeyBind(recorder_edit|on)- Open the recording editor after recording stops.KeyBind(recorder_edit|off)- Save the recording without opening the recording editor; a Save dialog opens if no destination was supplied.
schedules_enabled(on/off)Switches all scheduled Tasks together while preserving each schedule's own enabled flag. Disabling the master prevents subsequent schedule dispatch; a Task already executing continues. This switch is independent of suspension and the trigger switches.
KeyBind(schedules_enabled|on)- Allow individually enabled schedules to run.KeyBind(schedules_enabled|off)- Stop schedules from dispatching Tasks.
Enabling the master advances overdue enabled Custom schedules to their next future occurrence. Disabled schedules are untouched. The disabled interval is excluded from the normal missed-schedule check; this command does not replay all missed Tasks. A schedule due at the current time can run on the next check. The tray and open Config Editor master checkbox follow the change.
scripts_dir(existing folder)(alias:scripts)KeyBind(scripts_dir|@DataDir)- Use the KeyBind data directory.KeyBind(scripts_dir|@Desktop)- Use the desktop.KeyBind(scripts_dir|@DataDir\Scripts)- Use the Scripts subdirectory, if it exists.
The folder must already exist. Changing it rebuilds the tray Scripts submenu.
sendkey_delay(0..1000 ms)Sets the pause between keystrokes sent by KeyBind. Increase it if the receiving program misses characters; reduce it for faster typing.
KeyBind(sendkey_delay|0)- Minimum: no configured delay.KeyBind(sendkey_delay|500)- Midpoint: 500 ms.KeyBind(sendkey_delay|1000)- Maximum: 1000 ms.
Whole numbers only.
sendkeydown_delay(0..1000 ms)Sets how long KeyBind holds each sent key down. Increase it if the receiving program fails to register short keypresses.
KeyBind(sendkeydown_delay|0)- Minimum: no configured delay.KeyBind(sendkeydown_delay|500)- Midpoint: 500 ms.KeyBind(sendkeydown_delay|1000)- Maximum: 1000 ms.
Whole numbers only.
server_debug_level(off/0..10)Sets how much diagnostic information the KeyBind server writes to its log. Changes take effect immediately without restarting the server. Off and 0 disable server logging; higher levels include the lower levels and add more detail.
KeyBind(server_debug_level|off)- Stop writing server diagnostic messages.KeyBind(server_debug_level|0)- Disable server logging using a numeric value.KeyBind(server_debug_level|1)- Log server starts, stops and failures.KeyBind(server_debug_level|5)- Also log Task summaries and results.KeyBind(server_debug_level|9)- Include full Task payloads and results.KeyBind(server_debug_level|10)- Include the most detailed Task context.
Use off or a whole number from 0 to 10. Messages go to server_log; this setting does not change KeyBind's separate debug_level.
- Note:
server_enabled,server_loads_at_launch,server_uses_tokensandserver_securesave before applying. Invalid values or failed saves do not change the runtime state. If the server fails to start for some reason (port in use, perhaps), @ExitValue isFalseand the preference remains as previously saved. If a command closes the HTTP connection it is using, that client will likely not get a response! server_enabled(on/off)Enables or disables the KeyBind HTTP server. Off stops its listener and closes connections immediately. Reports can still be generated and opened as static files. On starts the server immediately only when server_loads_at_launch is on; otherwise the next report opens it.
KeyBind(server_enabled|on)- Allow the server to run.KeyBind(server_enabled|off)- Stop the server and prevent report commands from starting it.
server_keep_alive(1m/2m/5m/10m/15m/30m/60m/permanently)Sets how long the KeyBind server remains available after an activity renews its timeout: opening a report, selecting an interval, accepting a report action or returning from a report Task. Status polling does not renew it. Changing the interval starts a fresh countdown immediately, without restarting the server. A stopped server stays stopped; the saved interval is used the next time it starts. Permanently keeps it available until KeyBind closes or you stop the server.
KeyBind(server_keep_alive|1m)- Keep the server available for one minute.KeyBind(server_keep_alive|2m)- Keep it available for two minutes.KeyBind(server_keep_alive|5m)- Use the default five-minute interval.KeyBind(server_keep_alive|10m)- Keep it available for ten minutes.KeyBind(server_keep_alive|15m)- Keep it available for fifteen minutes.KeyBind(server_keep_alive|30m)- Keep it available for thirty minutes.KeyBind(server_keep_alive|60m)- Keep it available for one hour.KeyBind(server_keep_alive|permanently)- Keep it available without an expiry time.
Only these intervals are accepted. With Always on enabled, only permanently is accepted; turn off Always on in Options before selecting a finite interval. This timeout controls the server and all its HTTP routes, including report actions and API access; it does not set a report refresh interval. A pending or running report Task defers expiry, and returning from a Task renews the interval.
server_loads_at_launch(on/off)Selects Always on. With the server enabled, on starts it immediately and keeps it available without expiry, including after future KeyBind launches. Off restores the saved server_keep_alive interval and starts a fresh timeout without closing an active listener. A saved permanently interval remains permanent. With the master off, changing this setting does not start the server.
KeyBind(server_loads_at_launch|on)- Keep the enabled server running permanently.KeyBind(server_loads_at_launch|off)- Use the saved keep-alive interval instead of Always on.
server_log(file path)Chooses where KeyBind writes server diagnostic messages when server_debug_level is enabled. The next message uses the new file; the server does not restart and existing log contents are not moved or erased.
KeyBind(server_log|@DataDir\server.log)- Save server messages in KeyBind's data directory.KeyBind(server_log|@Desktop\KeyBind Server.log)- Save server messages on your desktop.
Supply a non-blank file path. It must not identify an existing folder. The file need not exist: KeyBind creates the file and missing parent folders when it next writes a message, provided Windows allows access. @Tokens are saved in the path and expanded when the setting is applied. The selected max_log_size also controls when this log rotates.
server_page_scale(positive multiple of 5)Sets the web Options page scale as a percentage and saves it to the ini. The default and the page cog's reset value are 100. The Options page applies the saved value on load and on its next status check after a command changes it. Reports keep their stylesheet scale. Values below 5, fractions and values which are not multiples of 5 are rejected without changing the ini or the live value.
KeyBind(server_page_scale|125)- Set Options to 125%.KeyBind(server_page_scale|100)- Restore Options to 100%.
server_port(1..65535)Sets the local port used to open KeyBind reports in your browser. A changed port restarts a running server and closes its existing connections. A stopped server stays stopped unless Always on starts it. Setting the same port leaves existing connections open.
KeyBind(server_port|7566)- Use KeyBind's default port.KeyBind(server_port|8080)- Move the server to port 8080.
Use a whole number from 1 to 65535. Existing browser tabs retain the old port in their URLs; reopen the report to use the new port. If the server cannot start, for example because another program uses that port, a notification reports the failure and @ExitValue is false. The new port remains saved so you can select another port or retry it later. Invalid values and failed saves leave the previous port and connections unchanged.
server_secure(on/off)Enables exact Host checking and browser POST Origin checking. Authorized app tokens retain their existing Origin exception. Off removes these checks and allows cross-origin API requests; token authentication remains controlled by server_uses_tokens. The change applies to subsequent requests without restarting the listener. With both protections off, a browser page able to reach the server can submit Tasks with KeyBind permissions.
KeyBind(server_secure|on)- Apply Host and Origin checks.KeyBind(server_secure|off)- Remove Host and Origin checks and allow cross-origin API access.
server_uses_tokens(on/off)Requires a valid report or authorized-app token in request URLs when on. A changed choice closes the listener and connections; an enabled Always on server restarts immediately, otherwise the next report starts it. Reopen report pages to obtain the correct URL. Existing token values and app authorizations are retained. Off removes token authentication; Host and Origin checks remain controlled separately by server_secure.
KeyBind(server_uses_tokens|on)- Require security tokens.KeyBind(server_uses_tokens|off)- Remove token authentication from requests.
show_entire_history(on/off)Chooses whether Run History includes saved events from previous KeyBind launches or only events from the current launch. If the choice changes while Run History is open, its list restarts at the newest matching records and retains the text filter. Older records load as you scroll. This changes which events are displayed; it does not delete saved history.
KeyBind(show_entire_history|on)- Include saved events from previous launches.KeyBind(show_entire_history|off)- Show only events from the current KeyBind launch.
shutdown_task(Task/blank)KeyBind(shutdown_task|)- Clear the saved Task.KeyBind(shutdown_task|Speak(KeyBind is shutting down!))- Speak when KeyBind exits.KeyBind(shutdown_task|Beep(880|dur=150ms))- Play a short tone when KeyBind exits.
Sets the Task to run when KeyBind exits. This command saves the Task without running it immediately. Leave the value blank to disable it. You can include command parameters separated by pipes inside the saved Task. Supply one command or a .kc script path here; a ** separator starts another command in the calling Task rather than storing a chain.
smtp_server(text/blank)Sets the SMTP server used for subsequent mail. Saves encrypted text in
[mail]; an empty value clears the saved field without deleting its key. Text is not checked for server availability, valid addresses or accepted credentials. ASCII-only.KeyBind(smtp_server|smtp.example.com)- Save this example value; replace it with your own.KeyBind(smtp_server|)- Clear the saved field.
speak_task_define_end(text/blank)KeyBind(speak_task_define_end|)- Clear this extraction marker.KeyBind(speak_task_define_end|</body>)- Use an HTML body marker.
Sets where
Define()andDefineSelected()stop reading within the selected definition. If this text is found, the definition ends before it. Leave blank to read the complete selected HTML element. Choose a marker from the definition site's page; the example is not suitable for every site.speak_task_define_start(text/blank)KeyBind(speak_task_define_start|)- Clear this extraction marker.KeyBind(speak_task_define_start|<body>)- Use an HTML body marker.
Tells
Define()andDefineSelected()which part of a website contains the definition to speak or save. Supply an HTML element's ID or identifying text in its opening tag. Choose a marker from the definition site's page; the example is not suitable for every site. A blank value disables lookup unless you supply a start marker in theDefine()orDefineSelected()command.speak_task_define_url(URL containing @LookUp)(alias:defineurl)KeyBind(speak_task_define_url|https://www.thesaurus.com/browse/@LookUp)- Look up a word at Thesaurus.com.KeyBind(speak_task_define_url|https://www.dictionary.com/browse/@LookUp)- Look up a word at Dictionary.com.
Supply a full HTTPS URL or a scheme-free template containing @LookUp. Other schemes and leading relative paths are rejected. The HTTPS prefix is omitted in the saved value and added when opening the URL. Definition extraction markers may also need adjustment for the selected site.
speech_always_complete(on/off)Chooses whether a Task waits for speech to finish before running its next command. With this off, the Task can continue while speech plays; a later speech command can cut off the earlier speech. A
Speak()command's own wait parameter can override this setting.KeyBind(speech_always_complete|on)- Wait for speech to finish before continuing the Task.KeyBind(speech_always_complete|off)- Continue the Task while speech plays.
The choice is saved for subsequent speech. Speech run as part of a Task that must finish before KeyBind exits also requests waiting. A
Speak()command can override the choice with its own wait parameter. Supply an explicit on/off value; blank values, toggle requests and unrecognised words are rejected.speech_default_rate(-10..10)Sets how quickly KeyBind speaks when the speech command does not specify its own rate. Use a whole number from -10 to 10: negative values are slower, 0 is the voice's normal speed, and positive values are faster. The resulting speed depends on the chosen voice.
KeyBind(speech_default_rate|-3)- Speak more slowly.KeyBind(speech_default_rate|0)- Use the voice's normal speed.KeyBind(speech_default_rate|3)- Speak more quickly.
The rate is saved for subsequent speech. Decimal values and values outside the range are rejected.
speech_default_voice(installed voice name or part of one/blank)Chooses the Windows voice used to speak text when the speech command does not specify its own voice. Use a full installed voice name or a case-insensitive part of it. If several voices match, the first installed match is selected. A blank value selects the first installed voice. An unmatched name is rejected and your previous choice is retained.
KeyBind(speech_default_voice|Microsoft David)- Choose Microsoft David, if installed.KeyBind(speech_default_voice|Hazel)- Choose the first installed voice whose name contains Hazel.KeyBind(speech_default_voice|)- Choose the first installed voice.
The selected full voice name is saved and its tray-menu selection is updated. Subsequent speech uses the new voice; speech already playing is not interrupted. You can see your installed voice names in Options > Runtime & Speech or the tray voice menu.
speech_default_volume(0..100)Sets how loudly KeyBind speaks when the speech command does not specify its own volume. Use a whole number from 0 to 100; 0 is silent and 100 is the loudest speech volume. This does not change your Windows volume or the volume of other programs.
KeyBind(speech_default_volume|0)- Silence subsequent speech.KeyBind(speech_default_volume|50)- Use speech volume 50.KeyBind(speech_default_volume|100)- Use maximum speech volume.
The volume is saved for subsequent speech. Decimal values and values outside the range are rejected.
start_with_windows(on/off)(alias:startwin)KeyBind(start_with_windows|on)- Start KeyBind automatically when you sign in to Windows.KeyBind(start_with_windows|off)- Stop KeyBind from starting automatically when you sign in.
Enabling opens the startup-method chooser and may require a Windows approval prompt. Cancelling the chooser or failing the operation returns False.
startup_task(Task/blank)KeyBind(startup_task|)- Clear the saved Task.KeyBind(startup_task|Speak(KeyBind is starting.))- Speak when KeyBind starts.KeyBind(startup_task|Beep(880|dur=150ms))- Play a short tone when KeyBind starts.
Sets the Task to run when KeyBind next starts. This command saves the Task without running it immediately. Leave the value blank to disable it. You can include command parameters separated by pipes inside the saved Task. Supply one command or a .kc script path here; a ** separator starts another command in the calling Task rather than storing a chain.
suspended(on/off)On suspends KeyBind: Task HotKeys and the CapsLock window-information binding are released, and trigger Tasks, Sentinel dispatch and run-file processing pause. The Abort and recorder control keys remain registered. Off resumes those operations using their existing individual enable/disable settings. Schedules, CountDowns, the KeyBind server and app-usage monitoring continue independently.
KeyBind(suspended|on)- Suspend HotKeys and the affected automation.KeyBind(suspended|off)- Resume those operations.KeyBind(suspended|on)**Pause(3s)**KeyBind(suspended|off)- Suspend for three seconds, then resume within the same Task.
A Task already executing continues, including commands after this one. A standalone on command leaves HotKeys unavailable for resuming; use Suspend KeyBind in the tray or include the off command later in the same Task. The choice is saved and survives a restart. Requesting the current state does not register or release the HotKeys again. Resuming attempts to register configured HotKeys; a conflicting registration is not diagnosed by this setting handler.
task_history(on/off)Chooses whether testing a Task records it in the Task history drop-down shared by the Task editors and the report Task editor. Turning it off hides the history button and stops recording; turning it on shows the button and records tested Tasks again. Saved history is kept; disabling does not delete it.
KeyBind(task_history|on)- Record tested Tasks and show the history button.KeyBind(task_history|off)- Stop recording and hide the history button.
to_address(text/blank)Sets the default recipient when
Mail()orSendMail()does not supply one. Saves encrypted text in[mail]; an empty value clears the saved field without deleting its key. Text is not checked for server availability, valid addresses or accepted credentials. ASCII-only.KeyBind(to_address|recipient@example.com)- Save this example value; replace it with your own.KeyBind(to_address|)- Clear the saved field.
trigger_rate(0.1..10 seconds)(alias:rate)Sets the interval between checks for window triggers when Windows foreground-window notifications are unavailable. A shorter interval detects window changes sooner but checks more often.
KeyBind(trigger_rate|0.1)- Minimum interval: one tenth of a second.KeyBind(trigger_rate|5.05)- Midpoint: 5.05 seconds.KeyBind(trigger_rate|10)- Maximum interval: ten seconds.
usage_monitor(on/off)Starts or stops measuring how long each application is in the foreground. On loads the current month's data and starts recording; off checkpoints accumulated time and stops recording. Existing monthly data are retained. Monitoring is independent of suspension and the trigger switches.
KeyBind(usage_monitor|on)- Start app-usage monitoring.KeyBind(usage_monitor|off)- Save accumulated time and stop monitoring.
The choice is saved before monitoring changes. If the monthly data cannot be loaded or monitoring state cannot be written, @ExitValue is false and a notification reports the failure; the requested preference remains saved. A state-write failure can leave monitoring running with a write pending for retry. Repeating the command retries the existing synchronisation operation.
use_raw_hooks(on/off)Select Raw Input for click and wheel triggers when on, or the low-level hook when off. This saves the input-source preference and applies it immediately; it does not enable low-level hooks when they are off.
KeyBind(use_raw_hooks|on)- Select Raw Input.KeyBind(use_raw_hooks|off)- Select the low-level hook.
var_save_max_size(whole number 1 or more)Sets the maximum encoded length of each user variable saved by
VarSave()orVarsSaveAll(). Applies to subsequent saves without reloading KeyBind. The default is 512 characters. Line breaks become literal \n or \r sequences and backslashes are doubled before the length is checked, so each of these consumes two characters of the limit.KeyBind(var_save_max_size|512)- Use the default limit of 512 encoded characters per variable.KeyBind(var_save_max_size|4096)- Allow up to 4096 encoded characters per variable.
A value exactly at the limit is saved in full. A value exceeding the limit is saved as an empty value, rather than truncated; the variable in memory is unchanged. Changing the limit does not alter values already saved. Blank values, zero, negative numbers and fractions are rejected.
warning_color(RGB colour)Sets the warning colour used by completed CountDown timers and warning displays elsewhere in KeyBind, including ListView flashes and invalid Options entries. Open CountDown timers update immediately while retaining their current flashing phase.
KeyBind(warning_color|FF0000)- Use red warnings.KeyBind(warning_color|#FF8000)- Use orange warnings.KeyBind(warning_color|16711680)- Use red, expressed as a decimal RGB integer.
Accepts the same RGB formats and range as countdown_text_color. Exactly six digits are hexadecimal, so use 0x when you want to make the hexadecimal interpretation explicit. The colour is saved as six uppercase hexadecimal digits without a prefix.
web_search_url(URL containing @LookUp)(alias:weburl)Chooses the search site opened by
WebSearchSelected()for your selected text. Put @LookUp where the search words belong in the URL.KeyBind(web_search_url|https://www.google.com/search?q=@LookUp)- Search Google.KeyBind(web_search_url|https://www.bing.com/search?q=@LookUp)- Search Bing.KeyBind(web_search_url|https://duckduckgo.com/?q=@LookUp)- Search DuckDuckGo.
Supply a full HTTPS URL or a scheme-free template containing @LookUp. Other schemes and leading relative paths are rejected. The HTTPS prefix is omitted in the saved value and added when opening the URL.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindKeyBind(hooks|show)**MessageBox(Hook query|Query succeeded: @ExitValue)- shows the hook state and source in a tooltip; @ExitValue reports whether the query succeeded.KeyBind(debug|off)**MessageBox(Debugging|Verbose logging is off.)- returns logging to quiet and confirms.KeyBind(rate|1)**MessageBox(Trigger rate|Setting accepted: @ExitValue. Requested interval: one second.)- sets the trigger rate to one second and shows whether the setting was accepted.KeyBind(my_setup_done|yes)**MessageBox(Noted|Your own setting is stored - scripts can read it back.)- writes your own invented setting directly to the ini for your scripts to read back.
See also: ConfigEditor(), EditIniFile(), Reload()
Sentinel Commands:
Some commands work only with the Sentinel, or work differently when applied to a Sentinel, as there is no need to supply a file name; Sentinel is always working with whatever file appeared in its watched folder, which is kinda the whole point!
Folder Sentinel tasks must contain MoveTo() unless their first command is Ignore(). MoveTo() may appear anywhere in the sequence. File Sentinel tasks do not have this requirement.
You can of course add regular KeyBind commands to your Sentinel command, but these are the "special" commands which are only understood, at least in this form, by the Sentinel:
Ignore()
Ignore()- KeyBind ignores the file, leaving it right where it is. Nothing is renamed, moved or opened.
- @ExitValue: Empty. The file is skipped and processing moves on.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindIgnore()- as a default Sentinel task, only file types with their own task get processed; everything else gets ignored.Rename(@StampDate)**MoveTo(@Desktop\Sentinel-sorted)- with a globalIgnore()alongside, only typed groups reach this task.
See also: MoveTo(), OpenWith(), Rename(),
Sentinel()
MoveTo()
- MoveTo(Folder)
- Folder Sentinel: move the incoming file into the chosen folder. A folder Sentinel task must contain
MoveTo()unless it starts withIgnore(); it need not be the final command. File Sentinel tasks do not requireMoveTo(). - @ExitValue: Path. The file's new full path.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindRename(@Random|18)**MoveTo(@Desktop\Sentinel-sorted)- give arrivals random names and file them away.Rename(@StampDate)**MoveTo(@Desktop\Sentinel-sorted)**OpenTargetDir()- date-stamp, file, and open the destination to check the results.
See also: Ignore(), OpenTargetDir(), OpenWith(),
Rename()
OpenWith()
- OpenWith(Program/default)
- Sentinel: open the incoming file in the program you choose. Put it last, after any
MoveTo(), so the app gets the file's final location. - @ExitValue: Path. The file path, unchanged.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindRename(@Random|15)**MoveTo(C:\TEMP\DUMP)**OpenWith(@ProgramFiles\IrfanView\i_view64.exe)- file images away and open each one for a look.Rename(@StampDate)**MoveTo(D:\Docs)**OpenWith(default)- file documents away and open each one in its default app.Rename(@StampDate)**MoveTo(D:\Docs)**OpenWith(@ProgramFiles\Notepad++\notepad++.exe)- file documents away and open each one for review.
See also: MoveTo(), OpenTargetDir(), Rename()
OpenTargetDir()
OpenTargetDir()- Sentinel: open the destination folder from any
MoveTo()earlier in the task. Put it afterMoveTo()so KeyBind knows which folder you mean; on its own it does nothing. - @ExitValue: Path. The file path, unchanged.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindMoveTo(@Desktop\Sentinel-sorted)**OpenTargetDir()- file things away and open the destination to check them.Rename(@Random|18)**MoveTo(@Desktop\Sentinel-sorted\Images)**OpenTargetDir()- rename, file, and show the results.
See also: MoveTo(), OpenSentinelFolder()
Rename()
- Rename(Name)
- Renames the file. Supply a fixed name or generate a new name with numeric sequences, random characters, timestamps and more, using @Macros.
- @ExitValue: Path. The file's new full path.
- Examples:
click to select an example,
Ctrl+Win+Alt+Rto run it in KeyBindRename(@Random|18)- give the file a random name 18 characters longSpeak(@DroppedItemName has landed!)**Rename(@Random|12)**MoveTo(@Desktop\Sentinel-sorted)- announce a new file landing in Sentinel's folder then process that file.FileCopy(@DroppedItem|D:\Backup\@DroppedItemName)**Rename(@StampDate)**MoveTo(@Desktop\Sentinel-sorted)- make a timestamped copy of the file then move the original.Rename(@Sequence|2)**MessageBox(Renamed to @ExitValue)- show a message box confirming the file's new name (and path?).Rename(@Append_sorted)- keeps each arrival's name and adds the text before the extension.Rename(@Append@Random|18)- keeps each arrival's name and adds 18 random characters.Rename(@Sequence|1|4)**MoveTo(@Desktop\Sentinel-sorted)- gives incoming files four-digit sequence names before moving them.
See also: MoveTo(), OpenWith(), ResetSequence()