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.

facebookShare on Facebook
TwitterTweet

Leave a Reply Cancel reply

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

Full text search

Recent Posts

  • Dumping AWS Organization tree
  • Free is the most expensive
  • Terraform conditional resource and blocks
  • Upgrade Ubuntu 16.04 to latest release
  • Inspect and control network traffic on AWS
  • aws (8)
  • coffee (1)
  • headfi (1)
  • linux (7)
  • others (55)
  • security (2)
  • tech (36)
  • wordpress (2)

apache aws awscli azure backup cloud coffee coreos distributed filesystem docker ec2 EL8 elasticcache etckeeper featured heartbleed kernel linux mail meltdown mysql php pine python rdp rds Redhat Red Hat RHEL RHEL7 rpm Ryzen snapshot spectre SSL systemd tech terraform ubuntu ubuntu upgrade vector vpn wordpress xtreemfs yum

©2022 blog.headdesk.me | Powered by SuperbThemes & WordPress