Bug 24486 - [Patch] Error activating XKB configuration with MacBook keyboard model
Summary: [Patch] Error activating XKB configuration with MacBook keyboard model
Status: RESOLVED MOVED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 15:23 UTC by Bryce Harrington
Modified: 2018-12-28 00:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Add aliases for mac layouts (8.33 KB, patch)
2009-10-12 15:23 UTC, Bryce Harrington
Details | Splinter Review

Description Bryce Harrington 2009-10-12 15:23:38 UTC
Created attachment 30308 [details] [review]
Add aliases for mac layouts

Forwarding this patch from Ubuntu reporter Martin von Gagern:
https://bugs.edge.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/327963

Please:

 1. make macintosh_vndr/de(mac_nodeadkeys) an alias for macintosh_vndr/de(nodeadkeys)
 2. Do the same for the deadkeys variant
 3. Do the same for languages other than "de" with similar configuration
The attached patch tries to follow this approach. I grepped fro '"mac' in symbols/* and then made sure the same variants were included as aliases in symbols/macintosh_vndr/*. Not tested yet.

You might, on the other hand, be of the opinion that having different names for the same symbols is not the way to go, and that instead of providing these aliases at the xkb-data level, the user interface should prevent the user from selecting such combinations. In that case, another bug for the Gnome control-center would be in order, while you might mark this as invalid for xkeyboard-config.
Comment 1 Bryce Harrington 2009-10-12 15:28:44 UTC
Btw, here's the original bug report:

I've got Intrepid installed on a MacBookPro5,1 with German keyboard layout. I started configuring the keyboads using gnome-keyboard-properties as available from the settings menu. I first selected the layout "Germany Macintosh, eliminate dead keys" and followed that up with changing the model to "MacBook/MacBook Pro (Intl)". This resulted in an error message "Error activating XKB configuration" which asked me to prvide this additional information:

$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "de", "mac_nodeadkeys", ""
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "de", "mac_nodeadkeys", ""

$ gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd
 layouts = []
 model = macbook79
 options = []

As the error message from the dialog contains little actual information, I straced gnome-settings-daemon and identified a failing invocation of xkbcomp as the likely cause of the issue. By renaming /usr/bin/xkbcomp and replacing it with a wrapper script, I managed to get my hands on its input file and reproduce the issue:

$ cat /tmp/fileJPMGgA
xkb_keymap {
        xkb_keycodes { include "evdev+aliases(qwertz)" };
        xkb_types { include "complete+numpad(mac)" };
        xkb_compat { include "complete" };
        xkb_symbols { include "pc+macintosh_vndr/de(mac_nodeadkeys)+inet(evdev)" };
        xkb_geometry { include "macintosh(macbook79)" };
};

$ xkbcomp -I -I/usr/share/X11/xkb -xkm /tmp/fileJPMGgA /tmp/fileNtKqh7
Error: No Symbols named "mac_nodeadkeys" in the include file "macintosh_vndr/de"
                  Exiting
                  Abandoning symbols file "(null)"

That looks like a much better error description. Looking at /usr/share/X11/xkb/symbols/macintosh_vndr/de I see that indeed it doesn't contain a description of "mac_nodeadkeys". Neither does it include /usr/share/X11/xkb/symbols/de where the mac_nodeadkeys would have been defined. Changing the layout to simple "Germany Eliminate dead keys", I could use the MacBook keyboard model all right, just as mac_nodeadkeys layout worked all right with a Generic keyboard model. However, both combinations don't fully match the key labels.

My first concern is that for an obvious choice like a MacBook keyboard model with a mac keyboard layout, no obscure error messages should be generated by the Gnome UI. Secondly, it would be nice to actually get Mac keyboard layout, in order to stay consistent with OS X and friends.
Comment 2 Sergey V. Udaltsov 2009-10-13 01:34:46 UTC
That's tough one.

First of all, these days macs have usual PC kbds. Would it make sense to drop the rules referring to macintosh_vndr/* symbols? If necessary, variants could be added to the 'general' symbol files.

What I will try to do is analyze the difference between macintosh_vndr/* symbols and normal symbols. 

BTW, I immediately see that 'es' can be dropped - it only includes general default 'es' variant;)
Comment 3 GitLab Migration User 2018-12-28 00:44:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/issues/112.


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.