Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use a product called Keyboard Express in Windows. This allows me to map some key combination to some text output. So instead of filling out some text, let's say on a web page, I use the key combination to generate the text rather than have to retype it in its entirety. It's very useful for saving keystrokes.
I thought I might be able to do this in Linux with the keyboard shortcuts which various Linux desktops provide. But when I create a custom shortcut for these various desktops the text output which I provide is always interpreted as some sort of executable command in order to start a process, rather than as just text output.
Is there an equivalent in Linux which will allow me to map some keyboard shortcut to text output in order to save keystrokes when typing text ?
you need to specify the environment you use. Is it (inside) a web browser or in another specific application or is it a simple terminal and you are speaking about the command line or ????
you need to specify the environment you use. Is it (inside) a web browser or in another specific application or is it a simple terminal and you are speaking about the command line or ????
The environment is any process which accepts keyboard input. On Windows Keyboard Express translates the keyboard input from the hotkey to whatever keyboard input the hotkey specifies. Hotkeys are a single keystroke, like Alt-Shift-some-alphabetic. For instance I have Alt-Shift-i as a hotkey which generates my street address. So anytime I need to specify my street address in some Windows application which is waiting for me to type it in on the keyboard, instead of typing out my full street address I simply press alt-shift-i on my keyboard and my street address is input from the keyboard. This saves many keystrokes when I have to repetitively type in data for any given application which reads it from the keyboard. The hotkey can represent any keystroke, so I could have used just alt-i or control-i instead etc. Keyboard Express runs in the background on Windows but you can always bring it to the foreground ( it sits in the Windows system tray ) and add whatever hotkeys you want it to use.
The various Linux Window Managers ( Gnome, KDE, Unity etc. ) all have a Keyboard system setting that lets you add custom keystrokes. However all these custom keystroke are, as far as I can tell and have tried them, means to generating a command within that Windows Manager. What I want in Linux is what Keyboard Express provides under Windows: a means for taking single keystroke input and translating that into a sequence of keystrokes for any Linux process that is accepting input from the keyboard.
In that case I would say you misunderstood something. You can remap keys, but actually it depends on the applications. (for example in vi or emacs you can do that easily). But if you want to do it in general you need to check xmodmap and xkeymap that works only for GUI.
xkeymap
In that case I would say you misunderstood something. You can remap keys, but actually it depends on the applications. (for example in vi or emacs you can do that easily). But if you want to do it in general you need to check xmodmap and xkeymap that works only for GUI.
xkeymap
Actually Keyboard Express on Windows only works for GUI. It does not work at a Windows command prompt. So GUI on Linux would be fine. I will look at xmodmap and xkeymap, whose names suggest they work for any X-Windows GUI applications. Thanks for your suggestions !
The normal keyboard shortcut creator will enable you to do many commands. For example, on this computer Super+1 gives
gconftool-2 -t string -s /apps/panel/applets/clock/prefs/custom_format '<span color="#ffffff"><b>R%A%e%B</b></span>'
and Super+q
wine "/home/david/.wine/drive_c/Program Files/QemuLator/QemuLator2.3.exe"
In Gnome or Mate, you need the configuration editor; I don't know about KDE. Otherwise, the tool to use is xbindkeys.
The normal keyboard shortcut creator will enable you to do many commands. For example, on this computer Super+1 gives
gconftool-2 -t string -s /apps/panel/applets/clock/prefs/custom_format '<span color="#ffffff"><b>RA%e%B</b></span>'
and Super+q
wine "/home/david/.wine/drive_c/Program Files/QemuLator/QemuLator2.3.exe"
In Gnome or Mate, you need the configuration editor; I don't know about KDE. Otherwise, the tool to use is xbindkeys.
I don't want a keyboard shortcut to do a command. Instead I want a keyboard shortcut to translate to some input string when text is being accepted in a GUI program.
I found the Linux utility called 'autokey' ( https://code.google.com/p/autokey/ ) to do what I want and will probably use that. An alternative utility I have also found is 'IronAHK' ( https://github.com/polyethene/IronAHK ). Since I am a very experienced computer programmer highly proficient with Python and C#, I will look into both.
Perhaps what I was looking for was not explained very well by the title of my OP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.