Bug 486755

Summary: buggy keyboard maps for Macintosh
Product: [openSUSE] openSUSE 11.1 Reporter: Sebastian Wolff <BastisEmail>
Component: X.OrgAssignee: E-mail List <xorg-maintainer-bugs>
Status: RESOLVED WONTFIX QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P5 - None CC: markgray+to-suse, ro, sndirsch
Version: Final   
Target Milestone: ---   
Hardware: Macintosh   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Sebastian Wolff 2009-03-19 10:14:52 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-0.1 Firefox/3.0.6

This is a hopeful attempt to get useful keyboard layouts in the subsequent versions.

We use a MacPro (2008 edition) with Apple's standard USB keyboard. 

On Ubuntu 8.10 everything works fine:
o APPLE keys emulate ALT
o deadgraveacute is automatically set for letters like '´e' (here it is not working as you can see)
o € and @ are at the right places.
o multimedia keys like volume up/down, brightness up/down and  importantly EJECT CD work!

On OpenSuse 11.0 I configured Sax2 as "Macintosh" keyboard, "German", "deadgraveacute"
o APPLE keys emulate ALT
o € and @ are possible, but with the ALT keys (not with APPLE)
o "<" and "^" are exchanged!
o multimedia keys are NOT working

On OpenSuse 11.1 it got worse:
o ALT remains ALT
o no € possible
o "^" and "<" exchanged
o multimedia keys NOT working
When changing to "generic 105 keys (intl).", "German", "deadgraveacute" I was at least able to reenable "€" and "@"

In the end my keyboard is neither PC, not Apple. It would be great if openSuse 11.2 at least supports pure PC or pure APPLE modes. Maybe you can "borrow" some knowledge from Ubuntu which is working great on Mac?

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Mark Gray 2009-03-19 10:31:13 UTC
Please attach the relevant information requested on the webpages:

http://en.opensuse.org/Bugs:X

and

http://en.opensuse.org/Bugs/SaX2

(Information on how ubuntu configured X for you might be helpful, but probably isn't necessary.)
Comment 3 Ruediger Oertel 2009-03-20 08:57:14 UTC
hm,
I'm on factory and on a MacBookPro with a german keyboard.
multimedia-keys are usually not dependant on the x keyboard layout
but on other things like the used desktop or other apps like pommed
to drive actions when the keys are pressed.

Alt-e gives € here, but ALT is on the apple-key
currently I have the keyboard layout set in KDE,
it displays the used commandline as:
setxkbmap -model macbook79 -layout de -variant
"Keyboard model MacBook/MacBookPro (intl)", Layout "de"
Comment 4 Stefan Dirsch 2009-03-20 09:11:03 UTC
Thanks for your input, Rudi. Still we need some more information by the reporter.
Comment 5 Stefan Dirsch 2009-03-20 17:32:16 UTC
(In reply to comment #1)
> (Information on how ubuntu configured X for you might be helpful, but probably
> isn't necessary.)

Actually the output of 'setxkbmap -print' on Ubuntu would be *very* helpful.
Comment 6 Stefan Dirsch 2009-03-26 14:53:53 UTC
Still waiting for a response for at least a week. Please reopen once
you can provide the requested feedback. Thanks.
Comment 7 Sebastian Wolff 2009-03-27 15:56:50 UTC
Sorry for the late response. You were simply to fast in responding - I will try to clear up the report and fill it with details:


##########################################################
Ubuntu:

$ setxkbmap -print
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwertz)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+de(deadgraveacute)+inet(evdev)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

Behaviour:
"é" is working
ALT is on Alt
€ and @ are on right-Alt-E and right-Alt-Q
{[]} are on right-Alt-(7890)
(^°) and (<>) are exchanged, that is <WRONG> as well. 

##########################################################
openSuse:

First:
During installation it was not recognized by the setup application that the package "pbbuttonsd" must be installed. After installing this, the problems were greatly reduced!!! I believe, this is where Ubuntu passes openSuse. 

##########################################################
Second (openSuse)

setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(qwertz)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+de(deadgraveacute)+inet(logitech_g15)"      };
        xkb_geometry  { include "pc(pc104)"     };
};
Using this I have the following situations:
ALT is on Alt
"é" is working.
€ and @ are on right-Alt-E and right-Alt-Q
{[]} are on right-Alt-(7890)
(^°) and (<>) are exchanged, that is <WRONG> as well. 

##########################################################

It would be good to have ALT on Cmd
€ and @ may be on right-Cmd-E and right-Cmd-Q or on Alt-E/Alt-L (latter is better)
Also the brackets {[]} could be Apple-like (Alt-7890), the same goes for "~|" etc.

The problem not having ALT on Cmd is 1st, that I am not accustomed to this (but one can get used to it) and 2nd and more importantly: consistently. When switchign from X to shell #2 I have to press Ctrl+Alt+2, when switching from any text shell I have to press Ctrl+Cmd+2. 

##########################################################

3rd: (openSuse)

setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(qwertz)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+de(nodeadkeys)"     };
        xkb_geometry  { include "pc(pc105)"     };
};

The same as case 2, but nodeadkeys

##########################################################

4th: openSuse

setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "macintosh+aliases(qwertz)"     };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+macintosh_vndr/de(nodeadkeys)+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(apple)"        };
        xkb_geometry  { include "macintosh(macintosh)"  };
};

ALT is on Cmd -> good
"é" is NOT working -> nodeadkeys
€ and @ are on Alt-E and Alt-L -> Mac-like good
{[]}~| are Mac-like -> good
(^°) and (<>) are exchanged, that is <WRONG> as well. 

##########################################################

4th: openSuse

setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "macintosh+aliases(qwertz)"     };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+macintosh_vndr/de(deadgraveacute)+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(apple)"    };
        xkb_geometry  { include "macintosh(macintosh)"  };
};

ALMOST NOTHING WORKS!!!

ALT is on Alt; but I can not switch to a text shell anymore by either Ctrl+Alt+2 or Ctrl+Cmd+2!!!!
"'e" is NOT working -> WRONG (deadgraveacute)
€ and @ are NOT working (neither on Alt+L, Cmd+L, Alt+Q, Cmd+Q, Right-Cmd+Q, Right-Cmd+Q)
{[]}~| are NOT working
(^°) and (<>) are exchanged, that is <WRONG> as well.
Comment 8 Sebastian Wolff 2009-03-27 15:57:53 UTC
I forgot to reopne this bug report
Comment 9 Stefan Dirsch 2009-03-27 16:10:33 UTC
Could you give the settings of Rüdiger Oertel a try? Thanks.
Comment 10 Sebastian Wolff 2009-03-30 07:33:48 UTC
##########################################################

Settings of Ruediger Oertel:

setxkbmap -model macbook79 -layout de -variant "Keyboard model MacBook/MacBookPro (intl)", Layout"de"

setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "macintosh+macintosh(goodmap)+aliases(qwertz)"  };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+macintosh_vndr/de+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(apple)+level3(enter_switch)"       };
        xkb_geometry  { include "macintosh(macbook79)"  };
};

ALT is on Cmd -> good
"é" is working -> good
€ and @ are on Alt-E and Alt-L -> Mac-like good
{[]}~| are Mac-like -> good
(^°) and (<>) are exchanged, that is <WRONG> as well. 

##########################################################

For me, this is the best solution so far.
Still I have 2 issues with it:
(1) The ^°/<> keys are wrong
(2) Some assistance would be good. Using sax2 I would never figure out to chose this config :(


Thanks for all the advice!
Comment 11 Stefan Dirsch 2009-03-30 08:36:20 UTC
> For me, this is the best solution so far.
> Still I have 2 issues with it:
> (1) The ^°/<> keys are wrong

Rudi, same for you? Any hints?
Comment 12 Ruediger Oertel 2009-03-30 10:39:02 UTC
no issues with these keys here.

On my MacBookPro, these keys are:
 "<>" (between "left SHIFT" and "y" keys)
 "^°" (left of the "1!" key)
and both are working correctly.

However, this is no longer the setting I had above (currently
I've lost the "nodeadkeys" setting and didn't find the time yet
to find out how to enable that again).

Current:
> setxkbmap -print
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+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(evdev)"    };
        xkb_geometry  { include "macintosh(macbook79)"  };
};
Comment 13 Stefan Dirsch 2009-03-30 10:48:10 UTC
Rudi, can you still figure out the setxkbmap command line?
Comment 14 Ruediger Oertel 2009-03-31 09:24:54 UTC
okay, without "nodeadkeys":
setxkbmap -model macbook79 -layout de -variant

resulting setting:
# setxkbmap -print
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+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(evdev)"    };
        xkb_geometry  { include "macintosh(macbook79)"  };
};


with "nodeadkeys":
setxkbmap -model macbook79 -layout de -variant nodeadkeys

resulting setting:
#  setxkbmap -print
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(nodeadkeys)+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(evdev)"        };
        xkb_geometry  { include "macintosh(macbook79)"  };
};
Comment 15 Stefan Dirsch 2009-03-31 09:38:20 UTC
Thanks, Rudi! Sebastian, could you give these settings a try?
Comment 16 Sebastian Wolff 2009-04-01 15:03:32 UTC
I can not reproduce this:

setxkbmap -model macbook79 -layout de -variant ""

gives me a different layout, that is:
xkb_keymap {
        xkb_keycodes  { include "macintosh+macintosh(goodmap)+aliases(qwertz)"  };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+macintosh_vndr/de+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(apple)+level3(enter_switch)"       };
        xkb_geometry  { include "macintosh(macbook79)"  };
};

Still, it seems that this is deadgraveacute (é works) and </^ are still wrong.

######

Using the second option 
$  setxkbmap -model macbook79 -layout de -variant nodeadkeys
leads to

xkb_keymap {
        xkb_keycodes  { include "macintosh+macintosh(goodmap)+aliases(qwertz)"  };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+macintosh_vndr/de(nodeadkeys)+altwin(swap_lalt_lwin)+level3(alt_switch)+inet(apple)+level3(enter_switch)"   };
        xkb_geometry  { include "macintosh(macbook79)"  };
};

Again this differs from Ruediger's setting :(

No é gives ´e (nodeadkeys) and < and ° are still on the wrong keys.

Please note:
I do not use a MacBookPro
I use a MacPro and a recent iMac with an external aluminium USB keyboard (model number A1243)
Comment 17 Stefan Dirsch 2009-04-01 15:28:57 UTC
Hmm. Rudi is already using xkeyboard-config 1.5. You can find it on 

  http://download.opensuse.org/repositories/X11:/XOrg/openSUSE_11.1/noarch/

Could you give it a try? Thanks.
Comment 18 Stefan Dirsch 2009-04-01 15:30:07 UTC
> Please note:
> I do not use a MacBookPro
> I use a MacPro and a recent iMac with an external aluminium USB keyboard (model
> number A1243)

Ouch!
Comment 19 Sebastian Wolff 2009-04-01 16:43:22 UTC
Using version 1.5 I can reproduce Rüdiger's output. Still, the keys <° are wrong.

I tried most of the other keys and checked if they behave like expected. The only issue concerns multimedia keys. 

On MacOS, the key <F10> means [Mute]. [F10] is obtained by <Cmd>+<F10>. 
The current setting regarding the F-keys is okay in terms of <F10> means [F10]
The problem is: I don't have any idea how to invoke [Mute]. Shouldn't it be that <Cmd>+<F10> means [Mute]?
Comment 20 Stefan Dirsch 2009-04-01 16:54:09 UTC
I'm afraid I don't have the appropriate knowledge and hardware for getting this fixed. :-(

I suggest to discuss this on one of the opensuse mailing lists and add it to the documentation of our opensuse wiki once a solution has been found. Thanks for the report.