GNOME Bugzilla – Bug 129110
Need an explanation of GTK input methods
Last modified: 2018-02-13 20:17:27 UTC
Based on discussion with Telsa on IRC, I believe there's nothing in the user documentation about GTK input methods, and many long-term GNOME users have little to no idea of how this is meant to work. There probably ought to be a section discussing the popup menu that appears in text entry/text editing widgets, perhaps giving some documentation about some of the options that are commonly seen there. We should also mention the "Insert Unicode Control Character" popup menu. (I've never figured out what "Thai (Broken)" was on about) Alternatively, perhaps the UI for this needs to be overhauled?
Any idea where we need to ask for information on how this works?
The GTK inputmethod allows the user to switch the inputmethod, eg. from the default (which is X Input method I believe) to say cyrillic. It's another thing then how useful this is ;) There are other means as well to tell the GTK application which inputmethod to and one is the env. variable GTK_IM_MODULE. Technically this means that the GTKIMMultiContext, which holds all the IMModules dynamically unloads the "old" inputmethod and loads the new selected inputmethod to the user. Different inputmethods provide different means of inserting text. At least some Asian locales need something called a pre-edit buffer in order to properly build one character/sign. When the application is launched, GTK will "guess" the best available inputmethod for the locale you are using :)
How is this different to using the Keyboard Switcher? Should the two be used in combination?
With "Keyboard Switcher" you mean the panel applet, by which you can change the keyboard layouts, right? The Gtk inputmethod selection is a bit different, it doesn't change your keyboard layout. It changes the GTK inputmethod. A GTK inputmethod is a sort of a layer between the text entries (like GtkEntry and GtkTextView) and the keyboard. I know this isn't that clear :) So they should and are used together, yes. An example: Gtk allows the user to switch to an inputmethod that provides an UI. One example is ths SCIM inputmethod for chinese (+ other languages) [www.scim-im.org]. For "western" languages, where you don't need an UI or more complex interactions to input something, you probably never have to touch that CSM menu. Switching the layout changes what character is sent by pressing a keyboard button and the selected GTK inputmethod defines what happens to that character after that (default is obviously to insert it in the text entry).
It's slowly starting to make sense... What do UI and CSM stand for? Where can I find descriptions and instructions on using the Input Methods that come as default with GNOME: 'Amharic (EZ+)', 'Cedilla', and so on?
UI = User Interface, in this context actually a Graphical User Interface. CSM = Context Sensitive Menu, like the popup-menu in the text entry. About the documenation, I'm sorry, I don't think a proper exists (please say I'm wrong) ;) I'd remember that Owen Taylor is the author of those input methods, maybe he knows/can help?
Update on this one: I've emailed Owen Taylor, who replied to say he is too buddy with new work to look into this. I've had a few discussion on mailing lists (I forget which I'm afraid -- possible gtk or gnome-love), but these have left me none the wiser. I can't tackle this bug until someone can answer the following questions in clear, non-technical language: What can I accomplish with an input method that I can't do otherwise? How do I use an input method to accomplish this? (In reply to comment #0) > Alternatively, perhaps the UI for this needs to be overhauled? Quite likely. If nobody is capable of understanding how a piece of the interface works, and nobody can explain what it is for, it should be removed.
(In reply to comment #7) > I can't tackle this bug until someone can answer the following questions in > clear, non-technical language: > What can I accomplish with an input method that I can't do otherwise? You can insert something else than standard western characters, for instance Chinese. The input method interface provides you a way to change what and how you insert characters on-the-fly. For instance you may well be aware fo that Chinese characters are put together from a set of different strokes. > How do I use an input method to accomplish this? I think this the main problem. I don't personally know how you're supposed to use all those different input methods. These include Vietnamese, Cedilla, Cyrillic, etc. Should just have a look at that part of the code some nice day...
*** Bug 377409 has been marked as a duplicate of this bug. ***
Input method is an interface which allows you to input key sequences that compose special keys or allow you to insert characters which are not available straight from keyboard. (Take the T9 input on your phone for example...) But this isn't what most users would prefer to see. They want to know how to input special characters specific for this script. I take Cyrillic for example: In order to get "ю" character, I first have to press "y" ("ы") and then "u" ("у") (or combine y with u) I think the "overall explanation on what input methods are", isn't that big of a priority... Here is a nice example of the documentation I was looking for in bug 377409: http://gtk-im-extra.sourceforge.net/imlatinplus-doc.html
Latin Plus doesn't appear in the Input Methods context menu. If you can find the specification of what the IMs that come with GNOME do, then I can get it into the User Guide. Without that, I can't do anything.
I brought the Latin Plus documentation in as an example of what kind of information I would (or maybe others) would be interested in...
Created attachment 77128 [details] [review] im-docs.patch Ok.. I laid some groundwork... ;)
Good start. One thing I noticed because I've just had problems with it, is you missed the GTK Default input method (always top of the menu) which has useful capability for inserting Unicode code points with the sequence of actions: Ctrl-Shift-u hold ctrl-shift and type code point hex value release ctrl-shift and type something else. While ctrl-shift is held the input is shown as underlined text which is replaced by the code point defined by the hex value. "Input methods" is the description of this sort of functionality for entering characters not on the keyboard. Unfortuantely I don't know anything else about this default or any other input methods. Also how Gnome chooses which one to use needs to be found out and documented. My system chooses XIM instead of GTK Default which is not what I want. Setting the environment variable GTK_IM_MODULE will work but isn't much use for applications started from the menu, For the one application that I care about I have made a shell script that sets the variable and then runs the application and I have the menu invoke that script, but I'm sure thats not really the proper way. The value to set GTK_IM_MODULE to for the GTK Default is the not very obvious string "gtk-im-context-simple" hard coded in GTK, :-(, the others are listed in the immodules file as described in the GTK docs. Hope this helps a little. Cheers Lex
Still need this in the new gnome-help. There's a stub file keyboard-inputmethods.page.stub. And this should be linked to from tips-specialchars.page when done. The developers are talking about merging the keyboard layouts and input methods functionality into a single interface in 3.2 or later. If that happens, the help should reflect this change.
Comment on attachment 77128 [details] [review] im-docs.patch Marking page as outdated
This has completely changed for 3.5. Maybe the 3.6 release notes (to be written) can help understanding and documenting the stuff better.
https://help.gnome.org/misc/release-notes/3.6/i18n-ibus.html
Does https://help.gnome.org/users/gnome-help/stable/keyboard-layouts.html.en address any of this or is it in need of updates?
Looks like this is already covered in docs, so closing the bug. Please reopen if required.