Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I often type the same words in several applications:

  • Editor (emacs, vi)
  • Webbrowser
  • Shells

It would be great to have an autocomplete of the words I typed during the last week available in all the above applications.

Each of them has a way to improve the typing speed. But something at desktop level would be the best.

Example: "Continuous Integration". I want a fast way to type this word without changing the program which receives the input.

Do you understand what I mean?

Is there already something like this?

share|improve this question
    
Soetihng like Synapse (lifehacker.com/5704221/…) ? –  Salem Jan 10 at 9:58
    
I think they mean something like LibreOffice's autocomplete. It saves words you type (that meet a customizable length requirement). When you type the first few letters of a word it has saved, it will offer to type the rest, and you can hit tab to type it in, or keep typing to deny it. –  Klikini Jan 13 at 3:41

2 Answers 2

up vote 4 down vote accepted
+100

the solution to your request is Input Method.

what you have described is something familiar to most CJK language users.
let's review how input method works in current Linux systems.

Here's a simple architecture for a common input method system: NOTE: I snapshot this image from The X Input Method Protocol. some of the arrows are irelevant to following discussion. (historically, XIM (the X Input Method protocol) was the only protocol existed. it's overly complex and lacks some desired features. so it's mostly abandoned, though compatibilty is still provided by popular toolkits like GTK, Qt.)

an modern input method systemcontains serveral parts:
1. client side library support
typically implemented as a module loaded by toolkits. e.g. for GTK, see /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/
2. input method server
3. X server

how these parts fit together?
a user types a key. X server receives the hardware event from evdev interface, composes a XEvent and sends to the application under keyboard focus. the application toolkit(GTK, Qt) input method module intercepts the event and passed the info to input method server. the input method server figures what the user may want and passes some text back to the IM module.

now let's talk about the architecture of the IM server.
a IM server typically consists of two parts:
1. a IM framework which handles platform specific intricacies and provides a nice interface to IM engine and toolkit IM modules. it provides the IPC mechanisms used by IM module, IM server and IM engine.
2. various IM engines do the actual work of transforming user-typed keys to desired text. IM engines can be shared libraries loaded by IM server or independent processes communicating to the IM server. 3. auxilary input method configuration programs provides friendly user interface for customizing IM server and engine behaviors.

all in all, what IM does is to transform what you type to something diffent and optionally provide predictions.

here's is an example:
we use ibus-pinyin here to type some chinese characters.

the romanization of 汉语拼音 is 'han yu pin yin'. at first you need to type all these letters to get the four chinese characters. but after a few times, you just need to type the four initial characters 'h y p y' to get the chinese character.

in the ibus-pinyin case, 'han yu pin yin' is shortened to 'h y p y'.
more advanced IM engines utilize statistical learning techniques to provide better prediction. nothing can stop you from writing a english input method engine to provide typing boost.

as a bonus, all toolkits have input method support except some plain old X programs. so this is a quite universal solution.

EDIT: Thanks to Anders F. U. Kiær. http://fedoraproject.org/wiki/Features/Typing-Booster should be the answer

share|improve this answer
    
the most commonly used IM framework isibus. if i have time, i'll work on writing an IM engine to do that. any can try it and leave a link if you've a proof-of-concept code. –  sgx1 Jan 13 at 9:47
    
    
    
Your answer is the best. I give you the bounty :-) –  guettli Jan 15 at 15:06

Take a look at Autokey. It might fit your needs. C/P from their site:

AutoKey is a desktop automation utility for Linux and X11. It allows you to manage collection of scripts and phrases, and assign abbreviations and hotkeys to these. This allows you to execute a script or insert text on demand in whatever program you are using.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.