10

I've recently switched from Windows to Ubuntu 11.04, and a difference that bugs me a bit is, when a dead key (such as ^ or ´) is pressed twice, the behavior differs in the two OS'es.

On Windows, the first press is dead, but the second press gives you two characters. So, for instance, pressing ¨ once nets you nothing, but twice nets you ¨¨.

On Ubuntu, the first press is also dead, but the second press only nets you one character. So, pressing ¨ once nets you nothing, twice nets you ¨.

What I'd like to do is make dead keys function as on Windows, that is, pressing them twice nets you the character two times.

I do not wish to make them non-dead, as I then wouldn't be able to write for ü, for instance.

Is such a thing possible, and if so, how?

3 Answers3

1

You can get similar behavior with the compose key. The compose key can be set under System Settings -> Keyboard -> Layout -> Options -> Compose Key. Now, to type ü, press compose, release compose and then proceed as you would in Windows.

Edit: Misread slightly, you'd need to make the keys dead before doing this, which for me, they were by default.

aureianimus
  • 3,586
0

What I'd like to do is make dead keys function as on Windows, that is, pressing them twice nets you the character two times.

I do not wish to make them non-dead, as I then wouldn't be able to write for ü, for instance.

I wanted the same thing and failed to find an easy way to have ubuntu behave exactly like windows (dead key, but type it twice when typed twice). The solution that I am now using for myself uses dead keys, but still allows me to type special characters that are not on my keyboard, like à.

What I need to do to write such a character is to first press the "compose key".

There are multiple ways to set a compose key, including a nice gui with gnome-tweak-tool as proposed here. But using Capslock or Right Alt really messed with my flow.

So I propose this: Set a combination as your control key. I set it to AltGrSuper and now anything I type immediately after I release these two keys will be combined into one character.

This is done as follows:

  1. Set your keyboard layout to not use dead keys
  2. Find the available options with grep "compose:" /usr/share/X11/xkb/rules/base.lst
  3. Set your preferred option using something like this command
    dconf write /org/gnome/desktop/input-sources/xkb-options "['compose:lwin-altgr']"
  1. You might have to log out and back in again
lucidbrot
  • 1,461
  • 3
  • 21
  • 41
0

What you're asking isn't possible as far as I know; however if you would change your keyboard-layout to one with AltGr deadkeys, you'll still be able to have your deadkeys like ü.

How to get those deadkeys is very easy; e.g. ü would be AltGr + Shift + '.

If you don't have a dedicated AltGr key, then the right Alt key would be that key.