You are not logged in.

#1 2017-01-11 12:54:04

archibutor
Member
Registered: 2010-09-08
Posts: 7

[X and Finnish Keyboard layou] Undesirable diacritics, how to disable?

Problem description:
On Finnish keyboard, to produce the "~" character, one must keep AltGr down, then tap the ~ key, release AltGr and press space.
This is error-prone, as I often end up pressing space while AltGr is still held down.
On Xserver, this produces the unfortunate side-effect of adding a diacritic to the previous character (usually space on a command line).

Example:

$ ls ~ #desired
$ ls ̃ #undesired

Desired solution:
This is probably unicode character combining, but I have absolutely zero idea how to get rid of this.
I cannot disable Level3 modifier on my AltGr-key, because it's essential to producing many other necessary characters.

Information:
Running GNOME on Xserver and the only keyboard setting I have touched is changing the layout to Finnish using GNOME keyboard settings.

- Animation of the problem while typing `ls ~` in terminal emulator (producing diacritic multiple times for emphasis)
- Output of `xmodmap -pke`
- Output of `setxkbmap -print -verbose 10`

Offline

#2 2017-01-11 13:49:36

jaergenoth
Member
Registered: 2015-01-16
Posts: 85

Re: [X and Finnish Keyboard layou] Undesirable diacritics, how to disable?

If it's not necessary to combine ~ with letters, you could change the AltGr+~ combo to create ~ instantly with xmodmap.

xmodmap -pke > ~/.Xmodmap

Then changing in ~/.Xmodmap:

# Find a line like this
keycode  35 = dead_diaeresis dead_circumflex dead_diaeresis dead_circumflex dead_tilde dead_macron dead_tilde
# Replace the fifth column dead_tilde with asciitilde
keycode  35 = dead_diaeresis dead_circumflex dead_diaeresis dead_circumflex asciitilde dead_macron dead_tilde

Then loading the new map with:

xmodmap ~/.Xmodmap

With this you lose the ability to create letters like Õ, but those are not used in finnish anyway.
You'd propably have to map ~ to some other key combination if you wan't to keep the ability to combine it with letters.

Last edited by jaergenoth (2017-01-11 13:51:25)

Offline

#3 2017-01-12 07:42:22

seth
Member
Registered: 2012-09-03
Posts: 50,960

Re: [X and Finnish Keyboard layou] Undesirable diacritics, how to disable?

Oher approach: "setxkbmap -variant dead_tilde", you can also add that as option to some xorg.conf.d snippet (depending on how you configure the system)
You can then make use of xim (readme! gnome doesn't use xim by default) to add funky glyphs like "ñ" (should work out of the box, I use and suggest capslock as compose key)

But if you press altgr and space together, best either get a better (bigger) keyboard or less fat fingers ;-)

Offline

#4 2017-01-12 08:25:22

jaergenoth
Member
Registered: 2015-01-16
Posts: 85

Re: [X and Finnish Keyboard layou] Undesirable diacritics, how to disable?

seth wrote:

Oher approach: "setxkbmap -variant dead_tilde", you can also add that as option to some xorg.conf.d snippet (depending on how you configure the system)
You can then make use of xim (readme! gnome doesn't use xim by default) to add funky glyphs like "ñ" (should work out of the box, I use and suggest capslock as compose key)

But if you press altgr and space together, best either get a better (bigger) keyboard or less fat fingers ;-)

This doesn't work. It results in an error because finnish layout doesn't have a dead_tilde variant.

$ setxkbmap -variant dead_tilde
Error loading new keyboard description

There is a nodeadkeys variant:

setxkbmap -variant nodeadkeys

You lose all different diacritics with this approach (as there are no dead keys) e.g. ^¨´`~
But xim (or SCIM, uim) and setting up a compose key may be a good solution though.

Last edited by jaergenoth (2017-01-12 08:28:52)

Offline

#5 2017-01-12 11:58:31

seth
Member
Registered: 2012-09-03
Posts: 50,960

Re: [X and Finnish Keyboard layou] Undesirable diacritics, how to disable?

Actually I was double wrong (sorry, my brains were still partially sleeping ;-)
The tilde  *is* a dead key for the finnish layout (thus the requirement for the stupid space bar invocation)

Looking at the actual layout, though, I assume nodeadkeys is just ok (ä, ö and å don't need deadkeys)

Offline

Board footer

Powered by FluxBB