Phrases that do more than plain text: today's date, whatever you last copied, a pick list, a short form. Start with the getting started page if you have not used Keystroke before.
How these are set up. Every phrase is a few lines in your phrase file, and the Keystroke editor writes them for you. Dates, times, what you last copied and where the cursor waits are made in the editor with the Insert button, beside "Text it becomes". The rest on this page are not in the editor yet, so each shows the lines that go into the file.
The examples here use shortcuts that start with a semicolon, so they fire the moment you finish typing; any shortcut works, as the getting started page explains.
To add one: open your phrase folder, open the phrase file (it ends in .yml) in Notepad, and paste the example under the line matches:, with two spaces in front of every line so it lines up with the phrases already there. Save the file and the phrase works straight away. Or ask whoever looks after your Keystroke to add it for you.
Useful when you cannot remember which one you picked.
You type
;addr or ;address
You get
1 Example Street, Sampletown, AB1 2CD
Set up
- triggers: [";addr", ";address"] replace: "1 Example Street, Sampletown, AB1 2CD"
Type the shortcut in lower case, with a capital first letter, or in capitals, and the phrase follows: although, Although, ALTHOUGH.
You type
;alh
You get
although
Set up
- trigger: ";alh" replace: "although" propagate_case: true
A date phrase is written once and gives the right date every day. The results below are from Tuesday 29 September 2026, just before 9.30am.
| You type | You get | Format |
|---|---|---|
| ;today | 29/09/2026 | %d/%m/%Y |
| ;longdate | Tuesday 29 September 2026 | %A %-d %B %Y |
| ;isodate | 2026-09-29 | %Y-%m-%d (sorts correctly in file names) |
| ;time | 09:24 | %H:%M |
| ;time12 | 9:25 am | %-I:%M %p |
| ;week | Week 40 | Week %V |
| ;tomorrow | Wednesday 30 September | %A %-d %B, moved on one day |
| ;nextweek | Tuesday 6 October | %A %-d %B, moved on seven days |
In the editor: put the cursor where the date should go, click Insert and choose Today's date, Tomorrow's date or Time now. A marker such as {{date}} appears in the text, and a box underneath lets you choose the day (today, tomorrow, yesterday, a week today) and the style, shown as real examples. The date can sit inside a sentence: Sent on {{date}}.
The editor offers the six styles in the first table. For any other, the lines below go into the phrase file.
Today, as 29/09/2026
- trigger: ";today"
replace: "{{d}}"
vars:
- name: d
type: date
params:
format: "%d/%m/%Y"Tomorrow, as Wednesday 30 September
- trigger: ";tomorrow"
replace: "{{d}}"
vars:
- name: d
type: date
params:
format: "%A %-d %B"
offset: 86400Put these together in any order, with any spaces, slashes or words between them. Results are from 9.25am on Tuesday 29 September 2026.
| Code | Gives | Meaning |
|---|---|---|
%d | 29 | Day of the month, always two digits (05 on the 5th) |
%-d | 29 | Day of the month, no leading zero (5 on the 5th) |
%e | 29 | Day of the month, a space instead of a leading zero |
%A | Tuesday | Day name |
%a | Tue | Short day name |
%u | 2 | Day of the week as a number, Monday is 1 |
%m | 09 | Month number, always two digits |
%-m | 9 | Month number, no leading zero |
%B | September | Month name |
%b | Sep | Short month name |
%Y | 2026 | Year |
%y | 26 | Year, last two digits |
%H | 09 | Hour on the 24 hour clock, two digits |
%-H | 9 | Hour on the 24 hour clock, no leading zero |
%I | 09 | Hour on the 12 hour clock, two digits |
%-I | 9 | Hour on the 12 hour clock, no leading zero |
%M | 25 | Minutes |
%S | 25 | Seconds |
%p | am | am or pm |
%j | 272 | Day of the year |
%V | 40 | Week number, weeks starting on Monday (the International Organization for Standardization (ISO) numbering used in most of Europe) |
%Z | +01:00 | Time difference from Coordinated Universal Time (UTC), +01:00 during British Summer Time |
offset moves the date by a number of seconds. It counts every day, weekends included.
| For | Offset |
|---|---|
| Yesterday | offset: -86400 |
| Tomorrow | offset: 86400 |
| A week today | offset: 604800 |
| In 30 days | offset: 2592000 |
| In two hours | offset: 7200 |
Puts whatever is on the clipboard into the phrase. Copy a link, type the shortcut, and the sentence arrives with the link in it. In the editor: click Insert, then What you last copied.
You copy, then type
https://example.com/page, then ;link
You get
Here is the link: https://example.com/page
Set up
- trigger: ";link"
replace: "Here is the link: {{clip}}"
vars:
- name: clip
type: clipboardHandy for a greeting where the name changes. In the editor: put the cursor where you will carry on typing, click Insert, then Where the cursor waits; [cursor] marks the spot. In the phrase file it is written $|$.
You type
;hi
You get
Hi |, Thanks for your message.
The cursor waits after "Hi ", ready for the name.
Set up
- trigger: ";hi" replace: "Hi $|$,\n\nThanks for your message."
Reuse a phrase you already have, so a change to it (a new job title, say) reaches every phrase that uses it.
You type
;thanks
You get
Thanks again. Kind regards, Alex Example
Set up
- trigger: ";thanks"
replace: "Thanks again.\n{{sig}}"
vars:
- name: sig
type: match
params:
trigger: ";sig"Picks one of several versions at random, so repeated messages do not all read the same.
You type
;bye
You get one of
Speak soon. Talk soon. Catch up soon.
Set up
- trigger: ";bye"
replace: "{{b}}"
vars:
- name: b
type: random
params:
choices:
- "Speak soon."
- "Talk soon."
- "Catch up soon."A small window lists the options. Choose one with the arrow keys and Enter, or click it, and it goes into the text.
You type
;status and pick "At risk"
You get
Status: At risk
Set up
- trigger: ";status"
replace: "Status: {{s}}"
vars:
- name: s
type: choice
params:
values:
- "On track"
- "At risk"
- "Delayed"A small form opens with a box for each blank. Fill them in, press Enter, and the finished text is typed. A blank can be a free text box or a list to choose from.
You type
;meet, then Sam and Monday
You get
Hi Sam, Are you free on Monday for a quick call?
Set up
- trigger: ";meet"
form: |-
Hi [[name]],
Are you free on [[day]] for a quick call?
form_fields:
day:
type: choice
default: Monday
values:
- Monday
- Tuesday
- WednesdayEach [[blank]] becomes a box. form_fields is only needed for blanks that are lists.
Runs a Windows PowerShell command and types what it answers. This example types the day of the week.
You type
;day
You get
Tuesday
Set up
- trigger: ";day"
replace: "{{out}}"
vars:
- name: out
type: shell
params:
cmd: "Get-Date -Format dddd"
shell: powershellEspanso can do these, but Keystroke does not offer them yet. Ask if you want one.
;hello and a name to get a greeting with that name in it.