Bug 28369

Summary: UK Keyboard layout not properly recognised on MacBook Pro 5,5 (Nov 2009)
Product: xkeyboard-config Reporter: Richard Léger <richard.leger>
Component: GeneralAssignee: xkb
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium Keywords: NEEDINFO
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Apple MacBook Pro 5,5 (Nov 2009) - United-Kingdom Keayboard Layout Photo

Description Richard Léger 2010-06-03 06:44:28 UTC
Created attachment 36031 [details]
Apple MacBook Pro 5,5 (Nov 2009) - United-Kingdom Keayboard Layout Photo

This bug is created as requested from existing bug (https://bugs.freedesktop.org/show_bug.cgi?id=28353).

By this message, I would like to report the bug I encounter with keyboard
detection on Laptop MacBook Pro 5,5 (purchased in Nov 2009) in the UK installed
with Ubuntu 9.10 (and fully updated) on amd64 architecture.

----------------------------------------------------
Summary 

The UK keyboard layout of this laptop is quite special and none of the
existing option in the gnome setting panel of the keyboard allow full
recognition of this layout.

----------------------------------------------------
Full description

Following installation of Ubuntu, it appears that by default the specific UK
keyboard of Apple MacBook pro laptop version 5,5 of Nov 2009 is not properly
recognised. It also appears to me after comparing with other keyboard that
Apple slightly changed the layout for that specific version of laptop (After
completing this message, I will attach the keyboard layout image for you to
see, remind me if I forgot to attach file :)

Please note also that I have also to write in French with this keyboard so in
order to match my need and the layout here is how I configured the layout in
gnome:

System > Preference > Keyboard
then Tab "Layout"
Keyboard Model: MacBook/MacBookPro (Intl)
Selected Layout: United Kingdom International (with dead keys)
Previously set to United Kindom Macintoch (which remain in the list of layout
but unselected)

I managed so far to make some of french letter with following key combinaison :
ALT Right + ;: + e = é
ALT Right + '" + e = ê (or SHIFT + 6 + e)
ALT Right + \| + e = è (or `¬ + e)
but I can't manage to type this letter
http://en.wikipedia.org/wiki/%C3%87 (maybe due to my ignorance of the proper
key combination, can't find it)

Those combinaison while not totally working are much more complicated that the
usual once met on US International Keyboard :
' + e = é
` + e = è
' + c = http://en.wikipedia.org/wiki/%C3%87

As I work as well under Debian (within a virtual machine on this Laptop hosted
by Ubuntu) I did managed at some point of time under this operating system to
solve some of my issue by twinking manually the defaut keyboard layout config
file as follow (information below may not be totally accurate as I don't recall
exaclty the process) :

File manually modified (corresponding to english keyboard layout) :
/usr/share/X11/xkb/symbols/gb 

I edited file and modified the intl part as follow to match UK keyboard layout
:
$ gedit /usr/share/X11/xkb/symbols/gb

"...

partial alphanumeric_keys 
xkb_symbols "intl" { 

    // Describes the differences between a very simple en_US 
    // keyboard and a very simple U.K. keyboard layout with 
    // dead keys. By Phil Jones (philjones1@blueyonder.co.uk) 

    // Includes the following keys: 
    // dead_grave 
    // dead_acute 
    // dead_circumflex 
    // dead_tilde 
    // dead_diaeresis 

    include "latin" 

    name[Group1]="United Kingdom - International (with dead keys)"; 

    key <AE02>  { [   2,                       at,           EuroSign,    
onehalf ] };
    key <AE03>  { [   3,                 sterling,        twosuperior,   
onethird ] };
    key <AE04>  { [   4,                   dollar,      threesuperior, 
onequarter ] };
    key <AE06>  { [   6,          dead_circumflex,           NoSymbol,   
onesixth ] };
    key <AD09>    { [   o,                        O,                 oe,       
  OE ] };

    key <AC11>  { [ dead_acute,    dead_diaeresis,     dead_diaeresis,        
bar ] }; //dead_doubleacute
    key <TLDE>  { [ section,            plusminus,            notsign,    
notsign ] }; //dead_grave

    key <BKSL>  { [ backslash,                bar,         numbersign,        
bar ] };
    key <LSGT>  { [ dead_grave,        dead_tilde,          brokenbar,        
bar ] };

    include "level3(ralt_switch)"
};

// Describe the differences between the US Colemak layout
// and a UK variant. By Andy Buckley (andy@insectnation.org)

..."

# Apply modification
$ setxkbmap

I am sure they might be a better and more professional and finish way to do it,
but as I am not very familiar with the keybaord conf architecture it is very
difficult for me event to understand clearly how I manage to do this :)

Ideally, I would prefer to see an option in the keyboard gnome setting panel
like :

Keyboard model: MacBook Pro 5,5
Select Layout: UK International (which works as US International keyboard)

This way I would be sure it works :)

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

I had also the following if it can be of any help :

HOST Ubuntu
$ setxkbmap -print
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)"    };
    xkb_types     { include "complete"    };
    xkb_compat    { include "complete"    };
    xkb_symbols   { include "pc+gb(mac)+inet(evdev)"    };
    xkb_geometry  { include "pc(pc105)"    };
};

VM Debian
 setxkbmap -print
xkb_keymap {
    xkb_keycodes  { include "macintosh+macintosh(goodmap)+aliases(qwerty)"   
};
    xkb_types     { include "complete+numpad(mac)"    };
    xkb_compat    { include "complete"    };
    xkb_symbols   { include
"pc+macintosh_vndr/gb+inet(apple)+level3(enter_switch)+gb(intl):2+level3(ralt_switch_for_alts_toggle):1+level3(ralt_switch_for_alts_toggle):2+group(alts_toggle)+eurosign(e)"
   };
    xkb_geometry  { include "macintosh(macbook79)"    };
};

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

Thank you for any help or update you may provide to have those two bugs
resolved :)
Would you need more information, feel free to contact me.

Have nice day.

Richard
Comment 1 Sergey V. Udaltsov 2010-06-03 13:57:17 UTC
First of all, let's concentrate on the native layout on the real machine, not VM.

Would you be able to create your layout based on existing gb(mac), by using include - and then the differences you want to make? Or, if it is simpler, based on gb(intl)?
Comment 2 Richard Léger 2010-06-04 06:17:26 UTC
Can't you prepare a draft file with what I already provided to you and let me know how I can test it ?

Then eventually I may be able to correct few things but I am really not a professional in this matter...

I can't even recall clearly how I exaclty did previous changes... it is really not easy for me.

Richard
Comment 3 Sergey V. Udaltsov 2010-06-18 15:03:23 UTC
I checked, it seems latin is the reasonable choice as a basis. Committed as gb(mac_intl)
Comment 4 Richard Léger 2010-06-19 05:10:33 UTC
(In reply to comment #3)
> I checked, it seems latin is the reasonable choice as a basis. Committed as
> gb(mac_intl)

Sorry in advance if it may appears as a stupid question, but... 

What do you mean ?

Do you want me to test the configuration ?
If yes, how shall I proceed ?

If we can make it works, I am sure it will be helpfull to many others :)
Thanks for your assistance.

Cheers!
Comment 5 Sergey V. Udaltsov 2010-06-19 16:12:01 UTC
> What do you mean ?
I mean that new variant was committed to git where xkeyboard-config keeps the source code.

> Do you want me to test the configuration ?
Up to you. Of course, if you have time, I'd appreciate some testing.
> If yes, how shall I proceed ?
Get the source code from xkeyboard-config git, build and install.

http://www.freedesktop.org/wiki/Software/XKeyboardConfig/Development

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.