Comment 23 for bug 272606

Revision history for this message
Leonardo Couto (leo4293) wrote :

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