On windows I often use the handy feature of the PuntoSwitcher program to auto-change the entered text to a given template. For example, I enter д_у and after the space, the text is replaced with Доброго утра! . Is there a program that implements this functionality under Ubuntu?

  • Look toward Xneur. - Chubatiy
  • I did not find such functionality in this application. If there is something similar, please explain how to set it up. - anderson
  • one
    I apologize, did not finish reading. I saw only the "analog PuntoSwitcher". Perhaps autohotkey.com can be set up for your purposes, but it won't be easy - Chubatiy
  • one
    I quote the main page "AutoHotkey is a free, open-source scripting language for Windows". Although you are right. Something similar is in the form of a package AutoKey. Thanks for the tip! - anderson
  • one
    It's my pleasure. Good luck! - Chubatiy

2 answers 2

The comments gave a tip to the package AutoKey . The package solves my problem. It is installed from the standard repository with the command sudo apt-get install autokey-gtk . Supports Python scripts.

    To implement such a simple task, you do not need to install anything at all. everything is already there and working. the program is called xorg . and she (among other things) has such a thing as xcompose (see, for example, the questions here concerning xcompose - there are not many of them).

    the only "inconvenience": in order for you to be able to enter the letter d , you will have to press (and immediately release) the so-called before the required sequence. compose key (which key it will be - you define it yourself in the keyboard settings).

    after that add to ~/.XCompose a line ~/.XCompose this:

     <Multi_key> <Cyrillic_de> <underscore> <Cyrillic_u>: "доброе утро" 

    although it makes sense to reduce to letters, removing the underscore :

     <Multi_key> <Cyrillic_de> <Cyrillic_u>: "доброе утро" 

    Now, by pressing (and releasing) the key assigned by you as the compose key , and then entering the sequence, you will receive the line "good morning".


    if a string is not entered (but a single character is inserted, substituted for a string), pay attention to this question: only a single character is substituted, and the string is ignored

    • Thank you for the detailed answer! Be sure to try. - anderson