Bug 12864 - Can't assign Macbook-Pro Keyboard layout
Summary: Can't assign Macbook-Pro Keyboard layout
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Keyboard (show other bugs)
Version: 7.0.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2007-10-19 15:58 UTC by Fabio Barone
Modified: 2008-02-03 15:46 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Fabio Barone 2007-10-19 15:58:44 UTC
When I try to set the keyboard to Macbook Pro (or Macbook Pro (Intl)),
I get an error dialog:

Error activating XKB configuration.
It can happen under various circumstances:
- a bug in libxklavier library
- a bug in X server (xkbcomp, xmodmap utilities)
- X server with incompatible libxkbfile implementation

X server version data:
The X.Org Foundation
70000000

If you report this situation as a bug, please include:
- The result of xprop -root | grep XKB
- The result of gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd

Here is the xprop output:
_XKB_RULES_NAMES(STRING) = "base", "pc101", "ch,gb,latam", "de_mac,mac,", "grp:alts_toggle,altwin:meta_win"
_XKB_RULES_NAMES_BACKUP(STRING) = "base", "pc101", "us", "", ""

And the gconftool output:
layouts = [ch  de_mac,gb       mac,latam]
 model = macbook78
 options = [grp grp:alts_toggle,altwin  altwin:meta_win]
 overrideSettings = true

Thanks
Comment 1 Sergey V. Udaltsov 2008-01-30 14:30:28 UTC
Could you try setting that configuration using setxkbmap utility?
Comment 2 Fabio Barone 2008-02-03 14:05:13 UTC
(In reply to comment #1)
> Could you try setting that configuration using setxkbmap utility?
> 

What exactly should I supply to the setxkbmap utility?
What is the correct code for the macbook pro keymap?
 
This is the current "setxkbmap -print" output:

xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(qwerty)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc(pc105)+ch(de_mac)+gb(mac):2+latam:3+level3(rwin_switch)"    };
        xkb_geometry  { include "pc(pc105)"     };
};

Comment 3 Sergey V. Udaltsov 2008-02-03 14:16:23 UTC
> What exactly should I supply to the setxkbmap utility?

setxkbmap -model macbook78 -layout 'ch,gb' -variant 'de_mac,mac' -option 'grp:alts_toggle' -option 'altwin:meta_win'
Comment 4 Fabio Barone 2008-02-03 14:31:00 UTC
Didn't work: This is the error I get:

setxkbmap -model macbook78 -layout 'ch,gb' -variant 'de_mac,mac' -option 'grp:alts_toggle' -option 'altwin:meta_win'
Error loading new keyboard description

Comment 5 Sergey V. Udaltsov 2008-02-03 14:32:49 UTC
Good!

So, let's make it more complex:

setxkbmap -model macbook78 -layout 'ch,gb' -variant 'de_mac,mac' -option
 'grp:alts_toggle' -option 'altwin:meta_win' -print

and

setxkbmap -model macbook78 -layout 'ch,gb' -variant 'de_mac,mac' -option
 'grp:alts_toggle' -option 'altwin:meta_win' -print | xkbcomp - :0
Comment 6 Fabio Barone 2008-02-03 15:18:03 UTC
> Good!
I like your attitude :-)

> 
> setxkbmap -model macbook78 -layout 'ch,gb' -variant 'de_mac,mac' -option
>  'grp:alts_toggle' -option 'altwin:meta_win' -print
> 

xkb_keymap {
        xkb_keycodes  { include "macintosh+macintosh(badmap)+aliases(qwerty)"  };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc(pc105)+macintosh_vndr/ch(de_mac)+inet(apple)+level3(enter_switch)+gb(mac):2+level3(ralt_switch_for_alts_toggle):1+level3(ralt_switch_for_alts_toggle):2+altwin(meta_win)+group(alts_toggle)+level3(rwin_switch)"    };
        xkb_geometry  { include "macintosh(macbook78)"  };
};

> and
> 
> setxkbmap -model macbook78 -layout 'ch,gb' -variant 'de_mac,mac' -option
>  'grp:alts_toggle' -option 'altwin:meta_win' -print | xkbcomp - :0
> 

Error:            No Symbols named "de_mac" in the include file "macintosh_vndr/ch"
                  Exiting
                  Abandoning symbols file "(null)"
Error:            success in unknown
                  Couldn't write keyboard description to :0


Comment 7 Sergey V. Udaltsov 2008-02-03 15:27:59 UTC
> Error:            No Symbols named "de_mac" in the include file
> "macintosh_vndr/ch"
>                   Exiting
>                   Abandoning symbols file "(null)"
> Error:            success in unknown
>                   Couldn't write keyboard description to :0
> 
That's an answer. Once you chosen model macbook78, the variants and layouts (listed in $macvendorlayouts in rules/base) are taken from the symbols/macintosh_vendor subdir. So I'd recommend chosing just layout 'ch' variant 'de'. Or - alternatively, local hack - removing 'ch' from the $macvendorlayouts list.

HTH
Comment 8 Fabio Barone 2008-02-03 15:39:03 UTC
OK thanks, here are the results:

fabio@fabio-laptop:$ setxkbmap -model macbook78 -layout 'ch' -variant 'de' -option 'grp:alts_toggle' -option 'altwin:meta_win'

fabio@fabio-laptop:$ setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "macintosh+macintosh(badmap)+aliases(qwerty)"   };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc(pc105)+macintosh_vndr/ch(de)+inet(apple)+level3(enter_switch)+level3(ralt_switch_for_alts_toggle)+altwin(meta_win)+group(alts_toggle)+level3(rwin_switch)"     };
        xkb_geometry  { include "macintosh(macbook78)"  };
};

Seems to work (?)
Comment 9 Sergey V. Udaltsov 2008-02-03 15:46:55 UTC
> Seems to work (?)
Great! Hopefully the resulting layout is not to far from your expectations.


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.