keymap fr/oss: numpad '.' mapped to period instead of KP_Decimal

Bug #188342 reported by Olivier Mengué
52
This bug affects 5 people
Affects Status Importance Assigned to Milestone
xkeyboard-config
Fix Released
Medium
Ubuntu
Invalid
Undecided
Unassigned
xkeyboard-config (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-input-kbd

In Ubuntu 7.10, xserver-xorg-input-kbd_1.2.0-1+1.2.1ubuntu1 with the following Xorg.conf settings:

Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver "kbd"
        Option "CoreKeyboard"
        Option "XkbRules" "xorg"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "fr"
        Option "XkbVariant" "oss"
EndSection

Got:
$ xmodmap -pke | grep 'keycode *91'
keycode 91 = KP_Delete period comma U202F comma U202F

Expected:
$ xmodmap -pke | grep 'keycode *91'
keycode 91 = KP_Delete KP_Decimal comma U202F comma U202F

This issue is a MAJOR usability issue in OpenOffice.org Calc, as in the current state Calc is unusable to enter decimal numbers quickly.
This is a major blocker for migration of Windows/Excel users to Ubuntu/OpenOffice.org. See bug #188331.

Revision history for this message
Olivier Mengué (dolmen) wrote :

The file to fix is probably /usr/share/X11/xkb/symbols/fr, lines 389 to 391:

< // French uses a comma as decimal separator, but keyboards are labeled with a period
< // Will take effect when KP_Decimal is mapped to the locale decimal separator
< key <KPDL> { [ KP_Delete, period, KP_Delete, KP_Decimal ] };

> key <KPDL> { [ KP_Delete, KP_Decimal, KP_Delete, KP_Decimal ] };

Revision history for this message
Olivier Mengué (dolmen) wrote :

Voici le paliatif.

Créez le fichier $HOME/.Xmodmap contenant les lignes suivantes :
! Correctif pour le bug 188342
! https://bugs.launchpad.net/ubuntu/+bug/188342
keycode 91 = KP_Delete KP_Decimal KP_Separator U202F KP_Separator U202F

Revision history for this message
Sebastien Bacher (seb128) wrote :

The comment indicates that's an upstream choice and not a bug

Revision history for this message
Jean Bréfort (jean-brefort-normalesup) wrote :

upstream choice? Who made that one? Ubuntu? It is just a bad choice IMHO. Things work with other distros like debian or gentoo (I did not test others).

Revision history for this message
Olivier Mengué (dolmen) wrote :
Revision history for this message
Olivier Mengué (dolmen) wrote :

This upstream choice is breaking a major application (OOo). Nicolas Mailhot seems to be the upstream maintainer of this keymap.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Things are not likely different in debian, the ubuntu xkeyboard-config is the debian version

Revision history for this message
Jean Bréfort (jean-brefort-normalesup) wrote :

You are right, my comment was stupid.

Revision history for this message
Olivier Mengué (dolmen) wrote :

When I was talking about "upstream", I was thinking to X.org, not Debian. I understand this is not the usual meaning of "upstream" here.
The "oss" alternative of the fr keymap is broken in Ubuntu because it is broken in Debian because it is broken in X.org.

Revision history for this message
Colin Watson (cjwatson) wrote :

As a workaround, you could choose to use the plain fr layout, without the oss variant. System -> Preferences -> Keyboard -> Layouts.

Revision history for this message
Fred (frederic-lespez) wrote :

I can confirm this bug in OpenOffice.org Calc and Gnucash.
The following workaround from Olivier Mengué works like a charm :
https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/188342/comments/2

I don't know if the workaround from Colin Watson works or not... But in Gnucash, numpad '.' doesn't work at all either with "French alternative" or "French" layout. See https://bugs.launchpad.net/gnucash/+bug/157968

It is a really annoying bug. It should work out of the box since this kind of thing drives users away instantly.

And yes indeed, "French uses a comma as decimal separator, but keyboards are labeled with a period". Neverless all french users expect that their numpad '.' gives a comma. And that's what happens in the "Windows" world. So give it to us, please ;-)

Rolf Leggewie (r0lf)
Changed in xkeyboard-config:
status: New → Triaged
Changed in xkeyboard-config:
importance: Undecided → Medium
Revision history for this message
In , Bryce Harrington (bryce) wrote :

From a Ubuntu bug:
https://bugs.edge.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/188342

[Problem]
It sounds like there is no good solution for handling KPDL, but we're getting some pushback from french users who would like the default switched to be KP_Decimal rather than period on fr keyboards.

Is this something that would be reasonable to consider changing?

[Original Report]
In Ubuntu 7.10, xserver-xorg-input-kbd_1.2.0-1+1.2.1ubuntu1 with the following Xorg.conf settings:

Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver "kbd"
        Option "CoreKeyboard"
        Option "XkbRules" "xorg"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "fr"
        Option "XkbVariant" "oss"
EndSection

Got:
$ xmodmap -pke | grep 'keycode *91'
keycode 91 = KP_Delete period comma U202F comma U202F

Expected:
$ xmodmap -pke | grep 'keycode *91'
keycode 91 = KP_Delete KP_Decimal comma U202F comma U202F

This issue is a MAJOR usability issue in OpenOffice.org Calc, as in the current state Calc is unusable to enter decimal numbers quickly.
This is a major blocker for migration of Windows/Excel users to Ubuntu/OpenOffice.org. See bug #188331.

(Another reporter adds "And yes indeed, "French uses a comma as decimal separator, but keyboards are labeled with a period". Neverless all french users expect that their numpad '.' gives a comma. And that's what happens in the "Windows" world. So give it to us, please ;-)" )

The file to fix is probably /usr/share/X11/xkb/symbols/fr, lines 389 to 391:

< // French uses a comma as decimal separator, but keyboards are labeled with a period
< // Will take effect when KP_Decimal is mapped to the locale decimal separator
< key <KPDL> { [ KP_Delete, period, KP_Delete, KP_Decimal ] };

> key <KPDL> { [ KP_Delete, KP_Decimal, KP_Delete, KP_Decimal ] };

Revision history for this message
Bryce Harrington (bryce) wrote : Re: keymap fr: numpad '.' mapped to period instead of KP_Decimal

My one concern here is that this may be one of those changes that some people will like, and some people will dislike. But not being French I can make no guesses about what the majority would prefer.

I've gone ahead and forwarded this upstream for further consideration at https://bugs.freedesktop.org/show_bug.cgi?id=19756 . In Ubuntu we'll stick with whatever upstream deems to be the correct approach, so if you'd really like it changed, I'd encourage you to subscribe to the upstream bug and share your thoughts on the matter.

Changed in xkeyboard-config:
status: Unknown → Confirmed
Revision history for this message
In , Sergey V. Udaltsov (svu) wrote :

Fixed. In case of troubles - I'll send the wrath of French users on you;)

Changed in xkeyboard-config:
status: Confirmed → Fix Released
Revision history for this message
Bryce Harrington (bryce) wrote : Re: keymap fr: numpad '.' mapped to period instead of KP_Decimal

Fixed in xkeyboard-config 1.5 now in Jaunty.

Changed in xkeyboard-config:
status: Triaged → Fix Released
Revision history for this message
Xwang (xwang1976) wrote :

I've a very similar problem using the Italian language on my kubuntu 9.04 amd64 system.
Openoffice and gnucash work correctly (they see the decimal separator of the keypad like a comma as prescrived by the current locale), but speedcrunch, kate, firefox, thunderbird and a lot of other programs see the decimal separator like a dot.
Shouldn't the KP_Decimal value be aligned with the locale settings?
This is the output of xmodmap -pke for this key:
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal
Thank you,
Xwang

Changed in xkeyboard-config:
importance: Unknown → Medium
Changed in xkeyboard-config:
importance: Medium → Unknown
Changed in xkeyboard-config:
importance: Unknown → Medium
Revision history for this message
Olivier Mengué (dolmen) wrote :

The "fr/oss" keyboard still has the bug in Ubuntu 11.10. And this is still a major usability issue for LibreOffice Calc users.

/usr/share/X11/xkb/symbols/fr in the oss section includes keypad(oss) which includes kpdl(dotoss):

partial keypad_keys
xkb_symbols "dotoss" {

    key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ;

    key <KPDL> { [ KP_Delete, period, comma, 0x100202F ] }; // <delete> . , ⍽ (narrow no-break space)
};

summary: - keymap fr: numpad '.' mapped to period instead of KP_Decimal
+ keymap fr/oss: numpad '.' mapped to period instead of KP_Decimal
Revision history for this message
mohican (mohican) wrote :

Bug still there on libreoffice 3.5.3 and Ubuntu 12.04.
and this time it seems that the workaround using legacy keyboard configuration does not work anymore.

As the status of this bug is "fix released" there is no chance that it will be reopened unless we do something.

How can we change the status ? Or should we create a new one ?

Revision history for this message
Jean Bréfort (jean-brefort-normalesup) wrote :

I don't see this bug anymore.

Revision history for this message
mohican (mohican) wrote :

My config :
Ubuntu 12.04 64 bits and 32 bits.
Keyboard = français (variante) (default choice at install time)
 LibreOffice 3.5.3.2

In Calc, numeric key '.' inputs dot instead of comma (french numerical separator)

Revision history for this message
Jean Bréfort (jean-brefort-normalesup) wrote :

Ok, not the same keyboard: français (variante obsolète), but even with the same keyboard layout as you have, I still get a comma.

Revision history for this message
mohican (mohican) wrote :

So, it works also for me with the français (variante obsolète).

In order to change really from one keyboard to the other you have to keep only one keyboard layout in the list.

Try this in the keyboard layout dialog :
- add français (variante)
-delete français (variante obsolète)
Then log out and log in again
Then try Calc

Revision history for this message
mohican (mohican) wrote :

Here is a solution for the keyboard layout "français (variante)" with Ubuntu 12.04 (found on the french forum), it is different from the solution used up to 11.10 :

In the keyboard layout parameter tool, go to
Options > disposition du pavé numérique > cocher "obsolète"

Revision history for this message
Jean Bréfort (jean-brefort-normalesup) wrote :

Things work for me out of the box, no need to check any box.

Revision history for this message
mohican (mohican) wrote :

Good for you. But several (lots ?) of french people still affected :
http://forum.ubuntu-fr.org/viewtopic.php?pid=9353481

Revision history for this message
mohican (mohican) wrote :

Interesting to note :
applying the solution in post #23, the numeric keypad will input a comma in LibreOffice
but still a dot in other applications (such as gedit, thunderbird, Wine notepad)

Revision history for this message
Lo_pescofi (corbieres) wrote :

On Ubuntu 12.04(x64) with french keyboard :
By défault the Delete key (.,) of keypad is interpreted like "point" (.). Is uncomfortable when use mathematical application like LibreOffice Calc.
For change, to haveDelete key (.,) of keypad is interpreted like decimal séparator. You need to change keyboard options like this:

System Parameter (ubuntu) \ Keyboard \ layout parameter
1)
=> Layout keypad "Obsolete"
=> Behavior of the "Del" key: "Default"
2) LibreOfffice Calc:
Decimal separator key: Same as the language setting checked (,)

The name of "Obsolète"is inappropriate !
--------------------------------------------------------------------
In french :
Sur Ubuntu 12.04(x64) avec clavier français (variante) :
Par défault la touche Suppr (.,) du clavier numérique est interprété comme un point(.) . C'est relativement inconfortable pour les application numérique telles que libreOffice Calc.

Pour que la touche Suppr (.,) du clavier numérique soit interprétée comme un séparateur décimal. Il faut modifier les options du clavier comme ceci :
1) Paramètre système (ubuntu) \ clavier \ paramètre d'agencement
=> Disposition du pavé numérique "Obsolète"
=> Comportement de la touche "Suppr": "Par défaut"
2) Calc:
Touche séparateur de décimales: coché Identique au paramètre linguistique (,)

Revision history for this message
mohican (mohican) wrote :

the keyboard layout which as this problem is "français (variante)" =? "français oss"
it is the one installed by default for most french keyboards in France.

there is no problem with the layout "français"
and the layout "français (obsolète)" =? "français latin9"

Revision history for this message
mohican (mohican) wrote :

In Ubuntu 14.04 Trusty the same problem remains with the french (alternate) = français (variante) keyboard layout.
(This layout is for me the best of all french layouts, and it is the one selected by default when installing Ubuntu.)

But now, "thanks" to the gnome simplying of interfaces we now no longer have access to the optionnal settings of the keyboard layout !

To have access to these settings, install gnome-tweak-tool, you will find them under the "typing" section.
However gnome-tweak-tool doesn't work too good in 14.04 (background is transparent !)

Revision history for this message
Jean-Marc Bourguet (jm-bourguet) wrote :

An alternative to gnome-tweak-tool withecho its transparent background and too short drop-box is directly using dconf-editor...

The key is /org/gnome/desktop/input-sources/xkb-options which has to contains 'kpdl:dot' (kpdl:kposs may also be considered, it adds KP_SEPARATOR with AltGr)

Revision history for this message
L@u (laurent-roche) wrote :

Still affected by this with Ubuntu 20.04.
In Ubuntu Budgie, there's no obvious parameter to solve this.
The modification of .Xmodmap did not work for me.

I added the following line in .bashrc (did not work in .profile):
xmodmap -e 'keycode 91 = KP_Delete KP_Decimal'

And now, problem solved ! ;)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.