Bug 470153

Summary: keyboard type br-abnt2 thinks "." is a "," on F11 Preview (numeric keyboard)
Product: [Fedora] Fedora Reporter: Luis Felipe Marzagao <lfelipebm>
Component: xkeyboard-configAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 12CC: hebert.bernardo, jrb, lkundrak, marcus, mcepl, mmtsales, rstrode, xgl-maint
Target Milestone: ---Keywords: EasyFix, Patch, Reopened, Triaged
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: 1.6-4.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-16 01:09:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Period key missing
none
xkbcomp output none

Description Luis Felipe Marzagao 2008-11-05 23:38:42 UTC
Description of problem:

keyboard type br-abnt2 thinks "." is a "," on F10 Preview (numeric keyboard)


Version-Release number of selected component (if applicable):

I don't know exactly which component should be reported as buggy.


How reproducible:

Always

Steps to Reproduce:
1. Install F10 Preview
2. Chage your keyboard type to br-abnt2
3. Turn num lock on.
4. Type a dot (.) on numeric keypad

  
Actual results:

You will get a comma (,)

Expected results:

You should get a dot (.)

Comment 1 Bug Zapper 2008-11-26 04:50:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Marcelo 2008-11-30 05:45:17 UTC
I confirm this bug in F10 final release. This is a regression, because this keyboard layout has always worked fine at least since FC3, which was the first version of Fedora I used.
Note that the abnt2 keyboard has both a "." (scan code 0x7E) and a "," (scan code 0x53) on the numeric keypad. Right now, both keys produce a "," when pressed under X. In text terminals, the keyboard works ok.
Please, if possible, do not take too long to restore the previous behaviour of the keypad. This problem greatly reduces the usability of the keypad in keyboards with this layout.
If there's any other information I can provide, please ask.
Thanks.

Comment 3 Hobbes 2008-12-01 15:45:21 UTC
It was fixed on Ubuntu.

Please, have a look on this:

https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/272606

I hope it will be helpful.

Comment 4 Marcelo 2008-12-01 17:30:26 UTC
Thanks very much for the link! Problem solved!

To the Fedora maintainer:
The file /usr/share/X11/xkb/keycodes/evdev, which is part of package xkeyboard-config-1.4-4.fc10.noarch, has the following lines in it:

// For brazilian ABNT2 keyboard.
xkb_keycodes "abnt2" {
    include "evdev(evdev)"
};


Please, change this to:

// For brazilian ABNT2 keyboard.
xkb_keycodes "abnt2" {
    include "evdev(evdev)"
    <KPPT> = 129;
};

And it all works ok. Please add this correction to the Fedora package. Thanks to Leonardo Couto, Ubuntu user, who did the research and found the solution. See bellow his complete post at the Ubuntu forum:

---------------------

I might have have found the problem.

The generic Brazil ABNT2 keyboard layout is attached.
The main difference in keypad is that the key besides the enter is a comma and there is a key above enter (dot).

In /usr/share/X11/xkb/geometry/pc there is the ABNT2 layout map. The numpad dot key is <KPPT> and comma is <KPDL>.

In /usr/share/X11/xkb/keycodes/evdev there is the following code:

// For brazilian ABNT2 keyboard.
xkb_keycodes "abnt2" {
    include "evdev(evdev)"
};

In evdev, the keycode for <KPDL> is 91, which correctly outputs a comma. But there is no definition for the <KPPT> key, which should have the keycode 129 (dot).

So, I modified the ABNT2 code in the evdev file to:
// For brazilian ABNT2 keyboard.
xkb_keycodes "abnt2" {
    include "evdev(evdev)"
    <KPPT> = 129;
};

And now everything is working how is supposed to.
I am a completely newbie in this stuff, so I am not sure about this.

Here is my output from 'xprop -root | grep XKB' and xev:
_XKB_RULES_NAMES(STRING) = "evdev", "abnt2", "br", "", ""

xev for numpad comma:

KeyPress event, serial 33, synthetic NO, window 0x3000001,
    root 0x1a6, subw 0x0, time 2036170, (298,-52), root:(309,643),
    state 0x10, keycode 91 (keysym 0xffac, KP_Separator), same_screen YES,
    XLookupString gives 1 bytes: (2c) ","
    XmbLookupString gives 1 bytes: (2c) ","
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x3000001,
    root 0x1a6, subw 0x0, time 2036286, (296,-69), root:(307,626),
    state 0x10, keycode 91 (keysym 0xffac, KP_Separator), same_screen YES,
    XLookupString gives 1 bytes: (2c) ","
    XFilterEvent returns: False

xev for numpad dot

KeyPress event, serial 33, synthetic NO, window 0x3000001,
    root 0x1a6, subw 0x0, time 2073656, (58,-4), root:(69,691),
    state 0x10, keycode 129 (keysym 0xffae, KP_Decimal), same_screen YES,
    XLookupString gives 1 bytes: (2e) "."
    XmbLookupString gives 1 bytes: (2e) "."
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x3000001,
    root 0x1a6, subw 0x0, time 2073738, (58,-4), root:(69,691),
    state 0x10, keycode 129 (keysym 0xffae, KP_Decimal), same_screen YES,
    XLookupString gives 1 bytes: (2e) "."
    XFilterEvent returns: False

Comment 5 Matěj Cepl 2008-12-05 14:18:47 UTC
*** Bug 473520 has been marked as a duplicate of this bug. ***

Comment 6 Ray Strode [halfline] 2008-12-16 22:03:34 UTC
*** Bug 475638 has been marked as a duplicate of this bug. ***

Comment 7 Wellington Uemura 2008-12-21 18:43:17 UTC
Created attachment 327588 [details]
Period key missing

I also like to add one more problem to this bug, I've not tried this solution yet but at the Keyboard configuration APP under SYSTEM menu, the period key is missing as show in the picture.

Comment 8 Marcelo 2008-12-28 21:37:35 UTC
Why did the package maintainers release a new version of the xkeyboard-config package without fixing this problem? This bug is very simple to fix and it is bad enough without needing to manually edit keyboard mapping files manually every time the package is updated.

Comment 9 Fedora Update System 2009-01-04 23:24:01 UTC
xkeyboard-config-1.4-6.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/xkeyboard-config-1.4-6.fc10

Comment 10 Fedora Update System 2009-01-07 09:18:57 UTC
xkeyboard-config-1.4-6.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xkeyboard-config'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-0109

Comment 11 Marcelo 2009-01-09 10:03:40 UTC
Works for me now. Thanks.

Comment 12 Matěj Cepl 2009-01-09 23:44:08 UTC
Reporter? Does xkeyboard-config-1.4-6.fc10 fix the issue for you?

Comment 13 Luis Felipe Marzagao 2009-01-12 23:39:41 UTC
Matej Cepl:

No, it does not work also.

It will only work if I manaully add the line:

<KPPT> = 129;

to /usr/share/X11/xkb/keycodes/evdev and restart.

Curiosly, OpenOffice.org Writer also thinks the "dot" key on the numeric keyboard is a "comma", but probably it's a OOo problem issue, since after the patch above gedit and all other gnome apps types the key correctly.

Thaks a lot.

Comment 14 Peter Hutterer 2009-01-13 00:03:11 UTC
(In reply to comment #13)
> Matej Cepl:
> 
> No, it does not work also.
> 
> It will only work if I manaully add the line:
> 
> <KPPT> = 129;
> 
> to /usr/share/X11/xkb/keycodes/evdev and restart.

uhm. that's exactly what 1.4-6 supposedly does.
Please attach the output of rpm -qa | grep xkeyboard-config and your unmodified /usr/share/X11/xkb/keycodes/evdev

Comment 15 Luis Felipe Marzagao 2009-01-14 00:23:26 UTC
Something must have gone wrong during update. I did it again and it's working now:

[root@localhost ~]# rpm -ivh --force xkeyboard-config-1.4-5.fc10.noarch.rpm 
Preparando...               ########################################### [100%]
   1:xkeyboard-config       ########################################### [100%]

[root@localhost ~]# cat /usr/share/X11/xkb/keycodes/evdev | grep -i KPPT
[root@localhost ~]# 
[root@localhost ~]# rpm -Uvh --force xkeyboard-config-1.4-6.fc10.noarch.rpm 
Preparando...               ########################################### [100%]
   1:xkeyboard-config       ########################################### [100%]

[root@localhost ~]# cat /usr/share/X11/xkb/keycodes/evdev | grep -i KPPT
	<KPPT> = 129;

Thanks

Comment 16 Fedora Update System 2009-01-29 23:06:07 UTC
xkeyboard-config-1.4-6.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Luis Felipe Marzagao 2009-05-26 00:56:08 UTC
The same Problem is present on F11 Preview. I'm up to date.

My keyboard is br-abnt2.

If I can provide any info, please give me directions.

Tks

Comment 18 Peter Hutterer 2009-05-29 04:49:21 UTC
please attach the output of setxkbmap -print. The line that was missing is in the keycodes/evdev file in F-11.

Comment 19 Luis Felipe Marzagao 2009-05-30 01:55:41 UTC
Hello, Peter:

[duli@localhost ~]$ setxkbmap -print
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+br+inet(evdev)+group(shift_caps_toggle)+srvr_ctrl(terminate_ctrl_alt_bksp)"	};
	xkb_geometry  { include "pc(pc104)"	};
};

Tks

Comment 20 Peter Hutterer 2009-05-31 22:48:37 UTC
Updating bug title to reflect F11 issue.

If I read this right, then the abnt2 doesn't seem to get set. Does it work if you run setxkbmap -model abnt2?
I just set the model in the gnome preferences tool, and my first line in setxkbmap -print reads:
	xkb_keycodes  { include "evdev(abnt2)+aliases(qwerty)"	};

How did you set it?

Comment 21 Luis Felipe Marzagao 2009-06-01 00:31:13 UTC
Actually, abnt2 does work. For example, ç, :, ? and / are all keys that do work. And they only work properly if you set the keyboard to abnt2. What is missing is really just the . on the numeric keyboard, which still issues a , instead.

They keyboard was set during install (Brasil - ABNT2). After installing, I did set it again via system-config-keyboard. Now I did it again through s-c-k and the result of setxkbmap still the same. Setting it in system > preferences > keyboard (selecting Brazil / Brazil) makes no difference.

Comment 22 Bug Zapper 2009-06-09 09:51:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 23 Luis Felipe Marzagao 2009-07-05 16:51:00 UTC
I just installed F11 final release. Updated tge system.

The bug still persists. My numeric keyboard has two "," instead of a "," and a ".".

[duli@localhost ~]$ setxkbmap -print
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+br+inet(evdev)"	};
	xkb_geometry  { include "pc(pc104)"	};
};



[root@localhost ~]# grep -i KPPT /usr/share/X11/xkb/keycodes/evdev
    <KPPT> = 129;

Please, let me know if I may provide any other info in order to help this get fixed.

Thanks

Comment 24 Luis Felipe Marzagao 2009-10-19 01:30:04 UTC
Okay, so in F11 problem is solved only if I select Keyboard model as Generic / Brazilian ABNT2 in gnome-keyboard-properties.

If I let the default "evdev" as keyboard model, then the problem persists.

Comment 25 Matěj Cepl 2009-11-05 18:20:27 UTC
Since this bugzilla report was filed, there have been several major updates in various components of the Xorg system, which may have resolved this issue. Users who have experienced this problem are encouraged to upgrade their system to the latest version of their packages. For packages from updates-testing repository you can use command

yum upgrade --enablerepo='*-updates-testing'

Alternatively, you can also try to test whether this bug is reproducible with the upcoming Fedora 12 distribution by downloading LiveMedia of F12 Beta available at http://alt.fedoraproject.org/pub/alt/nightly-composes/ . By using that you get all the latest packages without need to install anything on your computer. For more information on using LiveMedia take a look at https://fedoraproject.org/wiki/FedoraLiveCD .

Please, if you experience this problem on the up-to-date system, let us now in the comment for this bug, or whether the upgraded system works for you.

If you won't be able to reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you.

[This is a bulk message for all open Fedora Rawhide Xorg-related bugs. I'm adding myself to the CC list for each bug, so I'll see any comments you make after this and do my best to make sure every issue gets proper attention.]

Comment 26 Luis Felipe Marzagao 2009-11-09 02:30:08 UTC
Problem still persists with Fedora 12 (rc3).

Now it's worse, because I there aren't the Generic / Brazilian ABNT2 anymore in gnome-keyboard-properties. :(

Comment 27 Peter Hutterer 2009-11-23 06:29:36 UTC
Please run xkbcomp -xkb $DISPLAY - and attach the output here.


KPPT should be part of the standard evdev model, if you have a layout that maps it (br does so), then it should just work.
In fact, looking at the sources, KPPT is mapped to KP_Decimal and KPDL to KP_Separator in the brazilian layout (abnt2 is the standard now) - hence it should give you two different symbols. Please also make sure that you are in fact getting two different keycodes for the two keys.

Comment 28 Luis Felipe Marzagao 2009-11-24 00:42:46 UTC
Hello:

[duli@localhost ~]$ xkbcomp -xkb $DISPLAY
Warning:          Could not load keyboard geometry for :0.0
                  BadAlloc (insufficient resources for operation)
                  Resulting keymap file will not describe geometry



As for the keycodes, here are the results. I first pressed "," (keycode 91) and then "." (keycode 129), but both return ",".



[duli@localhost ~]$ xev

...

KeyPress event, serial 33, synthetic NO, window 0x5200001,
    root 0x1ad, subw 0x0, time 2448748, (182,-290), root:(186,165),
    state 0x10, keycode 91 (keysym 0xffac, KP_Separator), same_screen YES,
    XKeysymToKeycode returns keycode: 129
    XLookupString gives 1 bytes: (2c) ","
    XmbLookupString gives 1 bytes: (2c) ","
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x5200001,
    root 0x1ad, subw 0x0, time 2448820, (182,-290), root:(186,165),
    state 0x10, keycode 91 (keysym 0xffac, KP_Separator), same_screen YES,
    XKeysymToKeycode returns keycode: 129
    XLookupString gives 1 bytes: (2c) ","
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x5200001,
    root 0x1ad, subw 0x0, time 2449332, (182,-290), root:(186,165),
    state 0x10, keycode 129 (keysym 0xffac, KP_Separator), same_screen YES,
    XLookupString gives 1 bytes: (2c) ","
    XmbLookupString gives 1 bytes: (2c) ","
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x5200001,
    root 0x1ad, subw 0x0, time 2449388, (182,-290), root:(186,165),
    state 0x10, keycode 129 (keysym 0xffac, KP_Separator), same_screen YES,
    XLookupString gives 1 bytes: (2c) ","
    XFilterEvent returns: False


If I can provide any more info, please give me a pointer.

Thanks

Comment 29 Peter Hutterer 2009-11-24 06:19:31 UTC
(In reply to comment #28)
> [duli@localhost ~]$ xkbcomp -xkb $DISPLAY
> Warning:          Could not load keyboard geometry for :0.0
>                   BadAlloc (insufficient resources for operation)
>                   Resulting keymap file will not describe geometry

sorry, should have used quotes before - you forgot the "-" in the end, it tells xkbcomp to print to stdout. without it all you get is the error message and the output is written into a server-0.xkb file (or whatever $DISPLAY's value is)
please either attach that file or run the command again with a -

Comment 30 Fedora Update System 2009-11-24 07:26:20 UTC
xkeyboard-config-1.6-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/xkeyboard-config-1.6-4.fc12

Comment 31 Luis Felipe Marzagao 2009-11-25 00:27:03 UTC
Created attachment 373595 [details]
xkbcomp output

Comment 32 Luis Felipe Marzagao 2009-11-25 00:39:37 UTC
Great, the 1.6-4 version is working!

Thanks!

Comment 33 Peter Hutterer 2009-11-25 01:22:24 UTC
Thanks for testing, it was already fixed upstream but with the F12 pre-release freeze we didn't get to update to 1.7 yet.
There will be more automated comments as the package passes through the updates system, don't worry about those.

Comment 34 Fedora Update System 2009-11-25 15:28:23 UTC
xkeyboard-config-1.6-4.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update xkeyboard-config'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12157

Comment 35 Fedora Update System 2009-12-16 01:09:15 UTC
xkeyboard-config-1.6-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.