iMac UK keyboard layouts incorrect or fail

Bug #120420 reported by Mark Carter
4
Affects Status Importance Assigned to Milestone
console-setup (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I can't get the tilde to work properly in Feisty ubuntu for a 20" iMac in UK.

TO REPRODUCE THE PROBLEM
1. Select System > Preferences > Keyboard
2. Select tab Layouts
3. In the listbox "Selected layouts", check the item "United Kingdom Macintosh"
4. At keyboard Model, click the Choose button
5. Highlight Macintosh
6. Click OK

This puts up a dialog box with the following text:
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
70200000

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

WORKAROUND
1. Select the tab "Layout Options"
2. Expand the entry "Miscellaneous compitability options"
3. Check the box "Swap keycodes of two keys when Mac keyboards are misdetected by kernel"
4. Dismiss all open dialog boxes.

Tilde now works.

Revision history for this message
Mark Carter (mcturra2000) wrote :

Problem persists on Gutsy tribe 2.

Revision history for this message
Mark Carter (mcturra2000) wrote :

A bug maintainer changed the sourcepackagename from None to xorg. However, I don't think the bug is xorg specific, because the problem also appears in virtual consoles. Some tweaking to the underlying way that the keymaps work is required.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Ok, lets try console-setup. Do you still have the problem in 7.10 or Hardy alpha3?

Changed in xorg:
status: New → Incomplete
Revision history for this message
Mark Carter (mcturra2000) wrote :

Currently, I am using Gutsy 7.10 (full version). Virtual console grave and tilde don't work correctly.

So now I install:
 console-common
 console-data
 console-setup
 console-tools

As root, I do:
 dpkg-reconfigure console-setup
with
 Keyboard model: Macintosh
 The origin of the keyboard: United Kingdom
 Keyboard layout: United Kingdom
 AltGr key replacement: No AltGr key
 Compose key: No compose key
 Encoding on the console: UTF-8
 Set of characters ... : Combine - Latin; ...
 Font for the console: Fixed
 Font size: 16
 Virtual consoles in use: /dev/tty[1-6]
It generates the output:
 * Saving console font and keymap for next boot...
 WARNING: Undefined kernel key code for 101
 WARNING: Undefined kernel key code for 157
 WARNING: Undefined kernel key code for 160
 WARNING: Undefined kernel key code for 174
 WARNING: Undefined kernel key code for 176
 WARNING: Undefined kernel key code for 182
 WARNING: Undefined kernel key code for 183
 WARNING: Undefined kernel key code for 184
 WARNING: Undefined kernel key code for 204
 WARNING: Undefined kernel key code for 212
 WARNING: Undefined kernel key code for 214
 WARNING: Undefined kernel key code for 215
 WARNING: Undefined kernel key code for 216
 WARNING: Undefined kernel key code for 217
 WARNING: Undefined kernel key code for 222 [ OK ]
 update-initramfs: Generating /boot/initrd.img-2.6.22-14-generic

Virtual console grave and tilde is still not working at this stage.
I reboot, but it doesn't help.
Next, as root, I type
 install-keymap /usr/share/keymaps/i386/qwerty/mac-usb-uk.kmap.gz
If I go to a virtual console, then the the grave and tilde work correctly.
Also, the the key below the Esc key works correctly, too (formerly, it
operated the grave and tilde, which was wrong). The £, $, @ and " keys
all seem to work properly, too, so that keymap is exactly what I'm looking
for.

I reboot again, but the keyboard layout reverts to the old one (i.e.
where the grave and tilde don't work properly).

Revision history for this message
Mark Carter (mcturra2000) wrote :

This is still an ongoing problem with Hardy (full version).

Is there any way of telling what keymap I'm actually using?

Revision history for this message
Mark Carter (mcturra2000) wrote : Re: Tilde not working on iMac in UK (Hardy)

In my .xession file, I have added the line
xmodmap ~/docs/uconfig/xmodmap

In ~/docs/uconfig/xmodmap I have added the lines
keycode 49 = section plusminus
keycode 94 = grave asciitilde
This fixes the keyboard for me. So there's something that you guys need to jig in order to get the keyboard working properly.

Here's my xorg.conf keyboard setting:
Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver "kbd"
        Option "XkbRules" "xorg"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "gb"
        Option "XkbVariant" "mac"
EndSection

BTW, the corresponding keys on the virtual consoles are also wrong - although they do not generate the same values.

I'd be grateful if there was some way that this bug report isn't automatically expired, as it's been an issue that's been ongoing for some time, and it's definitely a bug.

Colin Watson (cjwatson)
Changed in console-setup:
status: Incomplete → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote : Re: Tilde not working on iMac in UK (Feisty)

Mark, do you know if this is still a problem in any release past hardy?

Revision history for this message
Mark Carter (mcturra2000) wrote :

Rolf, I seem to recall that Intrepid still had the problem. I'm using a regular Dell keyboard at the moment, and haven't got Jackalope currently installed. It's a bug that seems to have been ongoing for ages, and I've no reason to suppose that it's been fixed. When Koala comes along I can retest the keyboard. Until then, it would be best to keep this bug report open.

Revision history for this message
TJ (tj) wrote :

I can confirm this with Jaunty on a PowerPC iMac (/proc/cpuinfo: NewWorld 66 iMac FireWire, PowerMac2,2 740/750) with the Apple USB Keyboard (model number M2452). I've attached a photograph to avoid confusion.

There are two issues:

1. Mapping of the UK key-cap symbols for many of the non-alphabetical keys is incorrect in console and Xorg
2. Selecting Apple-specific layouts fails under Xorg.
3. There is no "#" symbol and no obvious alternate way to generate it - a big problem when trying to edit shell scripts

summary: - Tilde not working on iMac in UK (Feisty)
+ iMac UK keyboard layouts incorrect or fail
Revision history for this message
Mörgæs (moergaes) wrote :

Closing due to age.
If a similar bug appears in 15.04 (development) please open a new report.

Changed in console-setup (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
TJ (tj) wrote :

This still affects 12.04, 14.04 and beyond. In particular, Apple Bluetooth keyboard layouts (used with IBM-PC compatibles as well as Apple hardware), including the numeric keypad not operating in numeric mode and no obvious way to switch to it. "#" requires Right-alt+3, "~" and "|" keys reversed between Xorg and virtual terminals.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.