This macro provides a method to effectively paste text into a field that is otherwise restricted (e.g., a password confirmation)*. For many of these fields, the Keyboard Maestro action Insert Text by Typing will suffice (with or without the the Send To option). However, in cases when the web page or macOS app intercepts the Keyboard Maestro trigger, and/or in cases where the text must be pasted more slowly, this macro can be used.
*When the text is long (e.g., with secure passwords copied from a password manager) this can be particularly aggravating.
- Move the focus away from the restricted field (web page or macOS app).
- Optionally copy a text string into the Clipboard.
- Trigger this macro; a settings dialog will appear.
- Optionally modify the values displayed in the dialog: Wait before typing (in seconds; default = 5) , Text to type (default = Clipboard), and Delay between characters (in hundredths seconds; default = 0). Select the OK button.
- During the specified Wait, return the focus to the restricted field and wait for the text to be entered by the macro. The submarine sound will be heard when the typing is complete.
The Wait and and the Delay settings are saved for subsequent macro executions. However, if the Option Key (⌥) was included when the macro was triggered, Wait and Delay are reset to the default values, 5 seconds and 0 hundredths seconds, respectively. The defaults can be optionally changed below.
In contrast, the Text setting is not preserved; it always defaults to the value of the Clipboard.
• Keyboard Maestro v10.1.1
• Monterey, v12.4/MacBookPro16,1
• Mojave 10.14.16/Macmini6,2
• High Sierra 10.13.6/iMac11,1445
1.0 - Initial version
1.1 - Fixed typographical errors in this comment. No functional changes to the macro.
1.2 - Changed the timer (i.e., custom HTLM Prompt) to deselect Asynchronously.
a) Enhanced the timer: i) improved appearance, and ii) added Cancel, Reset and Restart buttons.
b) Improved the instructions in the initial dialog.
c) Moved the persistant values from individual global variables to a dictionary.
DOWNLOAD Macro File:
Paste Into Restricted Field.kmmacros (39 KB)
Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.