Logo Text Blaze

  • Docs
  • Community
  • Documentation

    Loading...

    Community Forums

    Loading...
Add to Chrome –  It's Free! Go to Dashboard ›
Commands

{key}

Summary: Simulates a key press in the current webpage.
Sample Usage
....
-Kind Regards{key:shift-tab}{key:enter}
_

Quick Overview Video

Settings


Setting NameTypeDescription
PositionaltextThe key press to simulate.
mactextOverride key press when on a Mac
wintextOverride key press when on Windows
linuxtextOverride key press when on Linux
crostextOverride key press when on a ChromeBook
General Command Settings
trimyes/no/left/rightIf yes whitespace is removed before and after the command. If left, only whitespace to the left is removed. If right, only whitespace to the right is removed.

The {key} command allows you to emulate a key press on the current page. For example, you can do {key: s} to simulate pressing the s key which will output an s character into the text field.

But, the most common use case is utilizing the {key} command to trigger shortcuts ({key: ctrl-s}), move the focus to another element ({key: tab}), or submit a form ({key: enter}). Click here to see more examples for the key command.

The syntax for the {key} command's positional setting is modifier-character. A character is the key that is pressed (e.g. s or a non-character like tab). The modifier, which is optional, is a key like shift key or the ctrl key. For example: {key: shift-tab} is utilizing both a modifier key and a character key.

Text Blaze key presses can trigger actions within a web page, but they cannot trigger standard system commands on your operating system.

For example, ctrl-c will not copy the currently selected text to the clipboard and ctrl-q will not quit the web browser as both those are system commands.

This also means that different websites might behave differently.

See the autopilot guide to learn more about what you can and cannot do with the {key} command.

Click here to see an example of automating writing your email utilizing the {key} command and form commands.

Modifiers

The following modifiers are supported:

KeyModifier
Shift Keyshift
Control Keyctrl
Alt (Option) Keyalt
Command (Meta) Keycmd

Also, it's possible to use multiple modifiers joined together with hyphens. For example ctrl-shift-x or alt-shift-tab.

Non-Character Keys

In addition to key presses that can be represented with a standard keyboard character (e.g. {key: s} or {key: p}), the following non-character keys are supported:

KeyKey Token
Tab Keytab
Enter Keyenter
Backspace Keybackspace
Left Arrow Keyleftarrow
Right Arrow Keyrightarrow
Up Arrow Key (experimental)uparrow
Down Arrow Key (experimental)downarrow

An example of usage of these keys would be {key: tab} to tab to the next field in the webpage (or {key: shift-tab} to tab to the prior field in the document). The remainder of the snippet would then be entered in that field, allowing you to fill out multiple fields with a single snippet.

The enter key is also useful for pressing a button to submit a form or trigger some action. tab and enter key commands can often be used sequentially to enable a variety of scripting behaviors.

Click here to see a real-world example utilizing the {click} and {key} autopilot commands.

Supporting Multiple Operating Systems

Key presses may be different on different operating systems. For example, saving a file may be ctrl-s on a Windows computer, but cmd-s on a Macintosh computer.

Text Blaze lets you define different key presses for each operating system via the optional win, mac, linux and cros override settings. When one of these is defined and the snippet is used on that operating system, Text Blaze will use the key press you defined for that operating system, rather than the default key press, which you define in the first positional setting.

For example, if you want to use ctrl-s on Windows, Linux or ChromeBooks; but cmd-s on a Macintosh computer, you could use the following:

This is most useful if you're using Text Blaze with your team and sharing snippets with them that will be used on a variety of operating systems.

Using formatter
{key: ctrl-s; mac=cmd-s}
_

To learn more about automating actions in a web page, see the autopilot guide.

  • Guides
    • Quick Start
    • Sharing Snippet Folders
    • Dynamic Commands
    • Date and Time
    • Autopilot
    • Forms
    • Tidying Whitespace
    • Lists
    • Teams and Organizations
  • Tutorial Videos
  • Showcase
  • Frequently Asked Questions
  • Formula Reference
  • Dynamic Commands
    • Using Dynamic Commands
    • {=} (Formula Command)
    • {click}
    • {clipboard}
    • {cursor}
    • {error}
    • {formdate}
    • {formmenu}
    • {formparagraph}
    • {formtext}
    • {formtoggle}
    • {if}
    • {import}
    • {key}
    • {link}
    • {note}
    • {repeat}
    • {site}
    • {snippet}
    • {time}
    • {user}
    • {wait}
  • Connected Snippets
    • Connected Snippets Overview
    • {image}
    • {urlload}
    • {urlsend}
    • {dbselect}
    • {dbinsert}
    • {dbupdate}
    • {dbdelete}
  • Command Packs
    • Capitalize
    • Gmail
    • LinkedIn
    • Randomize

About

Plans and Pricing
Sharing Snippets
Text Blaze for Business
Forms
Autopilot
Dynamic Commands
Command Packs

Support

Get Started with Text Blaze
Contact Us
Documentation
Community Forum
Blog

Solution for

Teams
Customer Support
Recruiters
Education
Healthcare
Sales
Property Managers

Other

Privacy Policy
Terms of Service
Open Source Licenses
Affiliate
© 2023 Blaze Today Inc