Bug 4910 - The keyboard "model" abnt2 is not compatible with the US Layout
Summary: The keyboard "model" abnt2 is not compatible with the US Layout
Status: RESOLVED FIXED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: doc (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high minor
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords: movetoxkc
Depends on:
Blocks:
 
Reported: 2005-10-27 16:41 UTC by Victor Bogado da Silva Lins
Modified: 2006-11-22 11:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Diff for the file /usr/lib/X11/xkb/keycodes/xfree86 (227 bytes, patch)
2005-10-27 16:42 UTC, Victor Bogado da Silva Lins
Details | Splinter Review
Diff for the file /usr/lib/X11/xkb/symbols/br (601 bytes, patch)
2005-10-27 16:43 UTC, Victor Bogado da Silva Lins
Details | Splinter Review
patch to symbols/br (586 bytes, patch)
2006-11-20 08:40 UTC, Ari Caldeira
Details | Splinter Review
patch to keycodes/xfree86 (298 bytes, patch)
2006-11-20 08:42 UTC, Ari Caldeira
Details | Splinter Review
new patch to keycodes/xfree86 (388 bytes, patch)
2006-11-22 04:36 UTC, Ari Caldeira
Details | Splinter Review

Description Victor Bogado da Silva Lins 2005-10-27 16:41:25 UTC
The ABNT2 keyboards have 2 keys more then the usual PC104 keyboard. Those keys
are  one a '.' in the keypad (since in Brazil the decimal separator is ',' and
logicaly the key on the right of the '0' is a ','). The other is a key between
the left 'shit' and the 'Z' at the lower left of the keyboard.

Now this second key stands for [ '\' '|' 'ΒΊ' '˘' ] or as configured in the
symbols/br:

     { [ backslash,        bar,    masculine,   dead_breve ]	}

The problem appear when we use two keyboards, in my case I have a standart
laptop keybooard and a external one with the ABNT2 layout. In the configuration
made by "Ricardo Y. Igarashi <iga@that.com.br>" you have that key labled <BKSL>
that in the same lable for a key with a similar layout in the pc104 keyboard.
This rename operation makes the key in the english layout simply disapear. 

I made a few changes in my configuration that make it all ok. I configured the
layout as ABNT2 and multiple layouts (Br and US international). After I made the
following simple changes to /usr/lib/X11/xkb/symbols/br and
/usr/lib/X11/xkb/keycodes/xfree86 all worked fine.

--------------- br.diff -----------------------

32c32,35
<     key <AC12>  { [bracketright, braceright,  masculine,    masculine   ] };
---
>
> // Altered by Victor Bogado <victor@bogado.net>
> //    key <AC12>  { [bracketright, braceright,  masculine,    masculine   ]
};>     key <BKSL>  { [bracketright, braceright,  masculine,    masculine   ] };
36c39,42
<     key <BKSL>        { [ backslash,        bar,    masculine,   dead_breve ]};
---
> // Altered by Victor Bogado <victor@bogado.net>
> //    key <BKSL>      { [ backslash,        bar,    masculine,   dead_breve ]};
>     key <AC13>        { [ backslash,        bar,    masculine,   dead_breve ]};
>

--------------- xfree86.diff -----------------------
407a408
> // Altered for compatibility
410,411c411,415
<     <BKSL> = 94;
<     <AC12> = 51;
---
> // Altered by Victor Bogado <victor@bogado.net>
> //    <BKSL> = 94;
> //    <AC12> = 51;
>     <BKSL> = 51;
>     <AC13> = 94;
Comment 1 Victor Bogado da Silva Lins 2005-10-27 16:42:47 UTC
Created attachment 3646 [details] [review]
Diff for the file /usr/lib/X11/xkb/keycodes/xfree86

Submited the diff for /usr/lib/X11/xkb/keycodes/xfree86
Comment 2 Victor Bogado da Silva Lins 2005-10-27 16:43:39 UTC
Created attachment 3647 [details] [review]
Diff for the file /usr/lib/X11/xkb/symbols/br

diff file uploaded
Comment 3 Sergey V. Udaltsov 2006-04-08 11:20:13 UTC
committed to xkeyboard-config. could you please check it works ok.
Comment 4 Ari Caldeira 2006-11-20 08:38:42 UTC
Dealing with the development of some new variants for the brazilian (br) 
layout, I found out that the proposed fix keeps the abnt2 model incompatible 
with other models that map the 94 scancode the the LSGT keycode.

Wouldn't it be better for the abnt2 model to follow the pattern of other 
models? If you want to, for instance, use model abnt2 and layout pt 
(portuguese), or model pc104 or pc105 and layout br, the LSGT keycode will work 
either way.

------ keycodes/xfree86 diff ------
414c414
<     <AC13> = 94;
---
>     <LSGT> = 94;

------ symbols/br diff ------
38c38
<     key <AC13>        { [ backslash,        bar,    masculine,   
dead_breve ] };
---
>     key <LSGT>        { [ backslash,        bar,    masculine,   
dead_breve ] };



Comment 5 Ari Caldeira 2006-11-20 08:40:54 UTC
Created attachment 7845 [details] [review]
patch to symbols/br
Comment 6 Ari Caldeira 2006-11-20 08:42:17 UTC
Created attachment 7846 [details] [review]
patch to keycodes/xfree86
Comment 7 Sergey V. Udaltsov 2006-11-20 11:18:20 UTC
Yes, these patch look reasonable. Committed.

Comment 8 Piter PUNK 2006-11-20 11:34:25 UTC
(In reply to comment #7)
> Yes, these patch look reasonable. Committed.
> 

The second patch is correct?
<LSGT> = 94; is from xfree86(basic) and will be inherited by abnt2. Only remove
the <AC13> = 94; is a good idea (i think).

Comment 9 Ari Caldeira 2006-11-22 04:35:42 UTC
Piter,

LSGT seems not be in xfree86(basic), but in xfree86(xfree86), which also 
defines <BKSL> = 51;

I changed it now, and it is working fine:

------ diff to keycodes/xfree86

412,414c412
<     include "xfree86(basic)"
<     <BKSL> = 51;
<     <LSGT> = 94;
---
>     include "xfree86(xfree86)"

------

The BKSL and LSGT keys are still recognized, and this way I think the abnt2 
model stays the most compatible with other models.
Comment 10 Ari Caldeira 2006-11-22 04:36:55 UTC
Created attachment 7860 [details] [review]
new patch to keycodes/xfree86
Comment 11 Sergey V. Udaltsov 2006-11-22 11:38:17 UTC
I already noticed that optimization, see in CVS:)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.