I think some of you use various flavours of Linux and even if you use Microsoft Windows there may be an equivalent way to do this there too.
I have a Microsoft Natural Keyboard 4000 and it has a bunch of extra keys across the top, some of which don't do anything in particular.
So it occurred to me that I would a lot of typing when filling out forms if I could assign one of those keys to type my email address into a field.
Create this script, save it somewhere and make it executable.
#!/bin/bash
TEXT="example@example.com"
xdotool sleep 0.5 type $TEXT
Note: It needs the sleep parameter in there or you only get the last half of the email address typed when you press the hotkey.
Then system-preferences-hardware-keyboard shortcuts
Create new shortcut
Point to that script
Press the key you want to call it from.
Done.
If you're using Wayland instead of X, you can accomplish the same thing using the ydotool command instead of xdotool.
(This should work on Wayland but I don't have anything to test it on.)
#!/bin/bash
ydotool type --delay 1000 --key-delay 70 "example@example.com"
Google tells me that there are some xdotool equivalents for Windows too.
So now the next time I'm filling out a form and it asks for my email address I can just hit one of those do-nothing keys on the top of my keyboard. I've got more of them too, so I suppose I could add my phone number or name to one of them as well.
The joy of automation.
I have a Microsoft Natural Keyboard 4000 and it has a bunch of extra keys across the top, some of which don't do anything in particular.
So it occurred to me that I would a lot of typing when filling out forms if I could assign one of those keys to type my email address into a field.
Create this script, save it somewhere and make it executable.
#!/bin/bash
TEXT="example@example.com"
xdotool sleep 0.5 type $TEXT
Note: It needs the sleep parameter in there or you only get the last half of the email address typed when you press the hotkey.
Then system-preferences-hardware-keyboard shortcuts
Create new shortcut
Point to that script
Press the key you want to call it from.
Done.
If you're using Wayland instead of X, you can accomplish the same thing using the ydotool command instead of xdotool.
(This should work on Wayland but I don't have anything to test it on.)
#!/bin/bash
ydotool type --delay 1000 --key-delay 70 "example@example.com"
Google tells me that there are some xdotool equivalents for Windows too.
So now the next time I'm filling out a form and it asks for my email address I can just hit one of those do-nothing keys on the top of my keyboard. I've got more of them too, so I suppose I could add my phone number or name to one of them as well.
The joy of automation.
Comment