Menu
blog.headdesk.me
blog.headdesk.me

Add a keyboard shortcut on Ubuntu

Posted on 2020/11/242021/07/25

If you need to type a certain string on regular basis, you may want to set it up as a keyboard shortcut. But one cannot just associate a hot key with the string. Here is how to do it on Ubuntu without installing any extra package.

Go to settings > keyboard shortcuts. Scroll all the way down and click on the + sign to add a new shortcut. In the command field, enter the command

xdotool getactivewindow sleep 0.5 type “[email protected]”

Associate it with a shortcut, for example ctrl-k. Click the cross icon and you’re all set!

xdotool allows one to type some string or move the mouse pointer. Do a man xdotool to learn more.

Loading

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Full text search

Recent Posts

  • Generate secure password
  • AWS Compute Savings Plans
  • AWS Zonal Shift
  • Coffee break…
  • Prevent private key from being committed to git
  • aws (14)
  • coffee (2)
  • headfi (1)
  • linux (9)
  • others (61)
  • security (2)
  • tech (41)
  • terraform (3)
  • wordpress (2)

Loading

apache aws awscli azure backup boot cloud coffee docker ec2 EL8 ElasticBeanstalk espresso featured git kernel lelit linux lvm meltdown MFA nat gateway php power proliant python rdp Redhat RHEL rpm Ryzen scp security smartarray smart switch snapshot spectre tech terraform ubuntu ubuntu upgrade vpn windows wordpress workspace

©2026 blog.headdesk.me | Powered by SuperbThemes