My preferred keyboard configuration is US-International. When I use it on MS-Windows and type certain special characters (i.e., ~ ' ") followed by a, o n I get á ó or ñ as I wish.
However when I type these characters followed by a letter that doesn’t match, I will get that special character followed by the letter. So if I want to type, let’s say, "q I can do it by pressing "q. However, if I do the same on Gnome I need to do it like "␣q, otherwise I get an audible bell.
Also, if I want to type two single quotes, in Gnome I need to type ' four times, instead of the two times it takes on MS-windows. I know it is a rather minor annoyance, but it does get to me, and I see GNU+Linux as a highly customizable OS, and I’d like to learn more about how do I do such things. Changing to the normal US keyboard is not an option, because I need to use characters such as á ó or ñ for typing in Spanish.
note: I am using Debian
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The dead key sequences are configured in the same place as the compose key sequences, in the compose map. The compose map file is loaded by each application when it starts up; the following files are tried in order:
- the file name indicated by the environment variable
XCOMPOSEFILE ~/.XCompose/usr/share/X11/locale/LOCALE_NAME/Compose(e.g./usr/share/X11/locale/en_US.UTF-8/Compose)
There’s no include mechanism, so if you want to modify the table, you’ll need to make a copy of the standard file and edit it.
For example, to define dead ¨ q to insert "q and dead ' dead ' to insert '':
<dead_diaeresis> <q> : ""q" <dead_acute> <dead_acute> : "''"
You’ll have to repeat the "q sequence for all letters, there’s no macro facility. As far as I know, there’s no fallback facility either: if a sequence is defined for <dead_diaeresis> <a> but none for <dead_diaeresis> <q> then typing <dead_diaeresis> <q> will not insert anything.
If you want more sophisticated capabilities, you’ll have to move on from the basic compose facility into the world of input methods. Input methods are primarily intended for people who use non-alphabetic scripts or multiple scripts, but of course you can use it for diacritics as well. Several input method frameworks are available. Since Gnome 3.6, Gnome integrates support for iBus.
Method 2
There are a few keyboard options, I can see about 5 or so us international. You seem to have dead keys enabled. Try another, are some that user alt gr combining eg alt gr"o for ö. There is also the option to use compose compose"o for ö (this is what I use), of Alt non-combining then alt gro may produce ö or ó or . Experiment with the various settings for keyboard layout.
Another option is to have two layouts, spanish and us-english. You can set a key for switching, and display the current layout in the tray.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0