个人工具

“UbuntuHelp:AppleKeyboard”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/AppleKeyboard}} {{Languages|UbuntuHelp:AppleKeyboard}} == Preface == Since Ubuntu 8.04 (Hardy Heron) the USB aluminium Apple Keyboard has not work...)
 
 
(未显示同一用户的4个中间版本)
第2行: 第2行:
 
{{Languages|UbuntuHelp:AppleKeyboard}}
 
{{Languages|UbuntuHelp:AppleKeyboard}}
 
== Preface ==
 
== Preface ==
Since Ubuntu 8.04 (Hardy Heron) the USB aluminium Apple Keyboard has not worked correctly. A change was added to the Ubuntu Linux kernel to make Apple [[UbuntuHelp:MacBook|MacBook]] keyboards gain additional functionality to their limited laptop style keyboard (Ubuntu bug [[https://bugs.launchpad.net/ubuntu/+source/linux/+bug/162083|#162083]]). Unfortunately this code change has some side effects for owners of the full size USB aluminium Apple Keyboard:
+
Since Ubuntu 8.04 (Hardy Heron) the USB aluminium Apple Keyboard has not worked correctly. A change was added to the Ubuntu Linux kernel to make Apple [[UbuntuHelp:MacBook|MacBook]] keyboards gain additional functionality to their limited laptop style keyboard (Ubuntu bug [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/162083 #162083]). Unfortunately this code change has some side effects for owners of the full size USB aluminium Apple Keyboard:
* Function keys have media functions as default. The "fn" key must be pressed and held to access the F-key functionality (except F5 and F6, which are inverted in this respect). (Ubuntu bug [[https://bugs.launchpad.net/ubuntu/+source/linux/+bug/201711|#201711]])
+
* Function keys have media functions as default. The "fn" key must be pressed and held to access the F-key functionality (except F5 and F6, which are inverted in this respect). (Ubuntu bug [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/201711 #201711])
* Num lock key will when pressed render the keyboard seemingly unusable. The keyboard will simulate a numeric keypad on the alphabet keys. Pressing F6 twice will exit this mode. (Ubuntu bug [[https://bugs.launchpad.net/ubuntu/+source/linux/+bug/201887|#201887]])
+
* Two keys are swapped on international (non-US) keyboard with respect to the printing on the keycaps. (Ubuntu bug [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/214786 #214786])
* Two keys are swapped on international (non-US) keyboard with respect to the printing on the keycaps. (Ubuntu bug [[https://bugs.launchpad.net/ubuntu/+source/linux/+bug/214786|#214786]])
+
* Bug filed in the main kernel bugzilla http://bugzilla.kernel.org/show_bug.cgi?id=10818. Please help if you think that the kernel developers are wrong, assuming that the keyboard have to behave like under MacOS.
* Bug filled by me in the main kernel bugzilla http://bugzilla.kernel.org/show_bug.cgi?id=10818 Please help if you think (as I) that the kernel developers are wrong, assuming that the keyboard have to behave like under MacOS.
+
== Default Behavior ==
 +
This section describe the default behavior of every Apple keyboard.
 +
=== Apple slim aluminium keyboard (0220) ===
 +
https://help.ubuntu.com/community/AppleKeyboard?action=AttachFile&do=get&target=wired_1_20070813a.jpg
 +
* 'fn'+'Enter' -> Insert
 +
* 'fn'+'Backspace' -> Delete
 +
* 'fn'+'Up' -> PageUp
 +
* 'fn'+'Down' -> PageDown
 +
* 'fn'+'Left' -> Home
 +
* 'fn'+'Right' -> End
 +
* 'Clear' behave like '[[UbuntuHelp:NumLock|NumLock]]'
 +
(See [https://bugs.launchpad.net/bugs/262408 #262408] as there is patch submit to map F13, F14 and F15 to PrintScreen, ScrollLock and Pause.)
 
== Corrections ==
 
== Corrections ==
=== Correcting the Function Key and Num Lock issue ===
+
=== Change Function Key behavior ===
* Edit the file '''/etc/modprobe.d/options''', e.g.:
+
This section of the document describe how to change the behavior of 'fn' key to better match what user expect. (See [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/201711 #201711], [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/162083 #162083])
 +
Here a description of each behavior :
 +
* 0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'
 +
* 1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.
 +
* 2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause).
 +
==== Ubuntu 9.04 (Jaunty Jakalope) ====
 +
===== Temporarily =====
 +
This section describe how to change the behavior of 'fn' with immediate effect (Restarting will reset the configuration).
 +
Execute the following commands to change the fnmode parameters. See section above for a description of available value.
 +
<pre><nowiki>
 +
$ sudo bash
 +
# echo 2 > /sys/module/hid_apple/parameters/fnmode
 +
# exit
 +
</nowiki></pre>
 +
===== Permanently =====
 +
This section describe how to change the behavior of 'fn' permanently. There is many way to proceed with this modification. Each sub section describe one way to permanently change the configuration.
 +
====== With .conf file (Recommended) ======
 +
1. Edit or create the file '''/etc/modprobe.d/hid_apple.conf''', e.g.:
 +
 
 +
<pre><nowiki>
 +
sudo gedit /etc/modprobe.d/hid_apple.conf
 +
</nowiki></pre>
 +
2. Add this line to the previously open file.
 +
 
 +
<pre><nowiki>
 +
options hid_apple fnmode=2
 +
</nowiki></pre>
 +
3. Save the file and execute the following command to notify hid_apple module to reload it's configuration.
 +
 
 +
<pre><nowiki>
 +
sudo update-initramfs -u
 +
</nowiki></pre>
 +
4. Reboot
 +
 
 +
====== With rc.local ======
 +
1. Edit the '''/etc/rc.local''' file.
 +
 
 +
<pre><nowiki>
 +
sudo gedit /etc/rc.local
 +
</nowiki></pre>
 +
2. Add this line near the end of the file, before the "exit" line:
 +
 
 +
<pre><nowiki>
 +
echo 2 > /sys/module/hid_apple/parameters/fnmode
 +
</nowiki></pre>
 +
3. Reboot
 +
 
 +
====== With sysfs.conf ======
 +
1. Edit the '''/etc/sysfs.conf''' file.
 +
 
 +
<pre><nowiki>
 +
sudo gedit /etc/sysfs.conf
 +
</nowiki></pre>
 +
2. Add this lines to the end of the file.
 +
 
 +
<pre><nowiki>
 +
module/hid_apple/parameters/fnmode = 2
 +
</nowiki></pre>
 +
3. Reboot
 +
 
 +
==== Ubuntu 8.10 (Intrepid Ibex) ====
 +
===== Temporarily =====
 +
With immediate effect, try
 +
<pre><nowiki>
 +
sudo bash
 +
echo 2 > /sys/module/hid/parameters/pb_fnmode
 +
exit
 +
</nowiki></pre>
 +
===== Permanently =====
 +
1. Edit the file '''/etc/modprobe.d/options''', e.g.:
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo gedit /etc/modprobe.d/options
 
sudo gedit /etc/modprobe.d/options
 
</nowiki></pre>
 
</nowiki></pre>
* Add the line: '''options hid pb_fnmode=0'''
+
2. Add the line:
* Save the file and execute the following command:
+
 
 +
<pre><nowiki>
 +
options hid pb_fnmode=2
 +
</nowiki></pre>
 +
3. Save the file and execute the following command:
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo update-initramfs -u
 
sudo update-initramfs -u
 
</nowiki></pre>
 
</nowiki></pre>
* Reboot
+
4. Reboot
=== Adding an Insert key, swapping Alt/Cmd positions and more ===
+
 
To make the keyboard work more like a normal PC keyboard add the following to your '''~/.Xmodmap''' file. Add the file if there is none.
+
Alternatively, you can modify '''/etc/rc.local''' to similar effect.
 +
* Edit the '''/etc/rc.local''' file:
 
<pre><nowiki>
 
<pre><nowiki>
! Configure F13 as Insert key, F14 as PrintScr, F15 as ScrollLock
+
sudo gedit /etc/rc.local
! and F16 as Pause/Break.
+
</nowiki></pre>
 +
* Add this line to the end of the file:
 +
<pre><nowiki>
 +
echo 2 > /sys/module/hid/parameters/pb_fnmode
 +
</nowiki></pre>
 +
Alternatively, you can modify '''/etc/sysfs.conf''' to similar effect.
 +
* Edit the '''/etc/sysfs.conf''' file:
 +
<pre><nowiki>
 +
sudo gedit /etc/sysfs.conf
 +
</nowiki></pre>
 +
* Add this lines to the end of the file:
 +
<pre><nowiki>
 +
module/hid/parameters/pb_fnmode = 2
 +
</nowiki></pre>
 +
=== Correcting the two swapped keys for international (non-US) keyboards ===
 +
This section describe how to fix the issue related to the swapped key when using international keyboard. (See [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/214786 #214786])
 +
==== Ubuntu 9.10 (Karmic Koala) ====
 +
* Edit your '''./.xsession''' file:
 +
<pre><nowiki>
 +
gedit ./.xsession
 +
</nowiki></pre>
 +
* Insert this line as the second line of the file (after the first line which is probably '''#!/bin/sh'''):
 +
<pre><nowiki>
 +
xmodmap -e 'keycode 49 = less greater less greater bar brokenbar bar' -e 'keycode 94 = dead_circumflex degree dead_circumflex degree U2032 U2033 U2032'
 +
</nowiki></pre>
 +
You will have to relogin or reboot. The <> and ^° key should now be in the correct position.
 +
==== Ubuntu 9.04 (Jaunty Jakalope) ====
 +
Need to confirm if the problem persist as there is modification done in the kernel to fix the problem.
 +
==== Ubuntu 8.10 (Intrepid Ibex) ====
 +
1. Open the 'System->Preferences->Keyboard' dialog
 +
2. Choose the 'Layouts' tab
 +
3. Press 'Layout Options...'
 +
4. Navigate to 'Miscellaneous compatibility options'
 +
5. Enable the option: '''Swap keycodes of two keys when Mac keyboards are misdetected by kernel.'''
 +
 
 +
=== Mapping keys (Insert, Alt, Cmd, etc.) ===
 +
This section describe how to change the mapping of key to better match PC's keyboard. e.g.: Swap the Alt key and Command key. The idea is to make the keyboard work more like a normal PC keyboard.
 +
==== Adding a Second Control key ====
 +
The command/apple keys on macs are recognized as "Super" or "Windows" shift by default. To make the right command key a ctrl key, save this in ~/.Xmodmap file:
 +
<pre><nowiki>
 +
clear control
 +
clear mod4
 +
 
 +
keycode 37 = Control_L
 +
keycode 134 = Control_R
 +
!### change 134 to 116 if using Ubuntu hardy, not 8.10 or later. ###
 +
add control = Control_L Control_R
 +
 
 +
add mod4 = Super_L
 +
</nowiki></pre>
 +
Then run the command "xmodmap ~/.Xmodmap".
 +
==== Ubuntu 8.10 (Intrepid Ibex) through 10.04 (Lucid Lynx) ====
 +
Save the following in a file .Xmodmap in your home directory:
 +
<pre><nowiki>
 +
! Swap Alt and Cmd keys.
 +
keycode 37 = Control_L
 +
keycode 133 = Alt_L Meta_L
 +
keycode 64 = Super_L
 +
keycode 108 = Super_R
 +
keycode 134 = ISO_Level3_Shift Multi_key
 +
keycode 105 = Control_R Multi_key
 +
clear Shift
 +
clear Lock
 +
clear Control
 +
clear Mod1
 +
clear Mod2
 +
clear Mod3
 +
clear Mod4
 +
clear Mod5
 +
add    Shift  = Shift_L Shift_R
 +
add    Lock    = Caps_Lock
 +
add    Control = Control_L Control_R
 +
add    Mod1    = Alt_L 0x007D
 +
add    Mod2    = Num_Lock
 +
add    Mod4    = Super_L Super_R
 +
add    Mod5    = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift
 +
 
 +
! Configure '=' key on numpad as '='.
 +
keycode 0x7D =  equal
 +
</nowiki></pre>
 +
Load the configuration by executing a command similar to the following.
 +
<pre><nowiki>
 +
xmodmap ~/.Xmodmap
 +
</nowiki></pre>
 +
Note : Gnome will ask you if you want to load this configuration the next time you log in.
 +
==== Ubuntu 8.04 (Hardy Heron) ====
 +
This section describe how to change the mapping for Ubuntu 8.04 (Hardy Heron) with kernel >= 2.6.27.
 +
1. Edit or create '''~/.Xmodmap''' file with a content similar to the following.
 +
 
 +
<pre><nowiki>
 +
! Configure F13 as Insert key
 +
! F14 as PrintScr
 +
| F15 as ScrollLock
 +
! F16 as Pause/Break
 
keycode 182 = Insert
 
keycode 182 = Insert
 
keycode 183  =  Print      Sys_Req
 
keycode 183  =  Print      Sys_Req
第29行: 第209行:
 
keycode 93  =  Pause  Break
 
keycode 93  =  Pause  Break
  
! Swap Alt and Cmd keys.
+
! Swap Alt and Command keys
 
keycode 0x25 =  Control_L
 
keycode 0x25 =  Control_L
 
keycode 0x73 =  Alt_L      Meta_L
 
keycode 0x73 =  Alt_L      Meta_L
第48行: 第228行:
 
add    Lock    = Caps_Lock
 
add    Lock    = Caps_Lock
 
add    Control = Control_L Control_R
 
add    Control = Control_L Control_R
add    Mod1    = 0 Alt_L 0x007D
+
add    Mod1    = Alt_L 0x007D
 
add    Mod2    = Num_Lock
 
add    Mod2    = Num_Lock
 
add    Mod4    = Super_L Super_R
 
add    Mod4    = Super_L Super_R
 
add    Mod5    = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift
 
add    Mod5    = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift
 
! Configure F17 as F13, F18 as F14 and F19 as F15.
 
keycode 131  =  F13
 
keycode 247  =  F14
 
keycode 132  =  F15
 
  
 
! Configure '=' key on numpad as '='.
 
! Configure '=' key on numpad as '='.
 
keycode 0x9D =  equal
 
keycode 0x9D =  equal
 
</nowiki></pre>
 
</nowiki></pre>
After the next login the keys should function as described in the file. You can also manually activate the new layout by calling
+
2. Load the configuration by executing a command similar to the following.
 +
 
 
<pre><nowiki>
 
<pre><nowiki>
 
xmodmap ~/.Xmodmap
 
xmodmap ~/.Xmodmap
 
</nowiki></pre>
 
</nowiki></pre>
from the command line.
+
Note : The configuration should be load on next logon.
=== Correcting the two swapped keys for international (non-US) keyboards ===
+
* Open the 'System->Preferences->Keyboard' dialog
+
* Choose the 'Layouts' tab
+
* Press 'Layout Options...'
+
* Navigate to 'Miscellaneous compatibility options'
+
* Enable the option: '''Swap keycodes of two keys when Mac keyboards are misdetected by kernel.'''
+
 
=== Belgian Macintosh Keyboard Layout ===
 
=== Belgian Macintosh Keyboard Layout ===
 
Take a look at https://help.ubuntu.com/community/Macbook_Air#head-5fd0bcf04cc7da0b5241950916bab5d58cdb84da in the Belgian Keyboard section
 
Take a look at https://help.ubuntu.com/community/Macbook_Air#head-5fd0bcf04cc7da0b5241950916bab5d58cdb84da in the Belgian Keyboard section

2010年5月19日 (三) 17:28的最新版本


Preface

Since Ubuntu 8.04 (Hardy Heron) the USB aluminium Apple Keyboard has not worked correctly. A change was added to the Ubuntu Linux kernel to make Apple MacBook keyboards gain additional functionality to their limited laptop style keyboard (Ubuntu bug #162083). Unfortunately this code change has some side effects for owners of the full size USB aluminium Apple Keyboard:

  • Function keys have media functions as default. The "fn" key must be pressed and held to access the F-key functionality (except F5 and F6, which are inverted in this respect). (Ubuntu bug #201711)
  • Two keys are swapped on international (non-US) keyboard with respect to the printing on the keycaps. (Ubuntu bug #214786)
  • Bug filed in the main kernel bugzilla http://bugzilla.kernel.org/show_bug.cgi?id=10818. Please help if you think that the kernel developers are wrong, assuming that the keyboard have to behave like under MacOS.

Default Behavior

This section describe the default behavior of every Apple keyboard.

Apple slim aluminium keyboard (0220)

AppleKeyboard?action=AttachFile&do=get&target=wired_1_20070813a.jpg

  • 'fn'+'Enter' -> Insert
  • 'fn'+'Backspace' -> Delete
  • 'fn'+'Up' -> PageUp
  • 'fn'+'Down' -> PageDown
  • 'fn'+'Left' -> Home
  • 'fn'+'Right' -> End
  • 'Clear' behave like 'NumLock'

(See #262408 as there is patch submit to map F13, F14 and F15 to PrintScreen, ScrollLock and Pause.)

Corrections

Change Function Key behavior

This section of the document describe how to change the behavior of 'fn' key to better match what user expect. (See #201711, #162083) Here a description of each behavior :

  • 0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'
  • 1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.
  • 2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause).

Ubuntu 9.04 (Jaunty Jakalope)

Temporarily

This section describe how to change the behavior of 'fn' with immediate effect (Restarting will reset the configuration). Execute the following commands to change the fnmode parameters. See section above for a description of available value.

$ sudo bash
# echo 2 > /sys/module/hid_apple/parameters/fnmode
# exit
Permanently

This section describe how to change the behavior of 'fn' permanently. There is many way to proceed with this modification. Each sub section describe one way to permanently change the configuration.

With .conf file (Recommended)

1. Edit or create the file /etc/modprobe.d/hid_apple.conf, e.g.:

sudo gedit /etc/modprobe.d/hid_apple.conf

2. Add this line to the previously open file.

options hid_apple fnmode=2

3. Save the file and execute the following command to notify hid_apple module to reload it's configuration.

sudo update-initramfs -u

4. Reboot

With rc.local

1. Edit the /etc/rc.local file.

sudo gedit /etc/rc.local

2. Add this line near the end of the file, before the "exit" line:

echo 2 > /sys/module/hid_apple/parameters/fnmode

3. Reboot

With sysfs.conf

1. Edit the /etc/sysfs.conf file.

sudo gedit /etc/sysfs.conf

2. Add this lines to the end of the file.

module/hid_apple/parameters/fnmode = 2

3. Reboot

Ubuntu 8.10 (Intrepid Ibex)

Temporarily

With immediate effect, try

sudo bash
echo 2 > /sys/module/hid/parameters/pb_fnmode
exit
Permanently

1. Edit the file /etc/modprobe.d/options, e.g.:

sudo gedit /etc/modprobe.d/options

2. Add the line:

options hid pb_fnmode=2

3. Save the file and execute the following command:

sudo update-initramfs -u

4. Reboot

Alternatively, you can modify /etc/rc.local to similar effect.

  • Edit the /etc/rc.local file:
sudo gedit /etc/rc.local
  • Add this line to the end of the file:
echo 2 > /sys/module/hid/parameters/pb_fnmode

Alternatively, you can modify /etc/sysfs.conf to similar effect.

  • Edit the /etc/sysfs.conf file:
sudo gedit /etc/sysfs.conf
  • Add this lines to the end of the file:
module/hid/parameters/pb_fnmode = 2

Correcting the two swapped keys for international (non-US) keyboards

This section describe how to fix the issue related to the swapped key when using international keyboard. (See #214786)

Ubuntu 9.10 (Karmic Koala)

  • Edit your ./.xsession file:
gedit ./.xsession
  • Insert this line as the second line of the file (after the first line which is probably #!/bin/sh):
xmodmap -e 'keycode 49 = less greater less greater bar brokenbar bar' -e 'keycode 94 = dead_circumflex degree dead_circumflex degree U2032 U2033 U2032'

You will have to relogin or reboot. The <> and ^° key should now be in the correct position.

Ubuntu 9.04 (Jaunty Jakalope)

Need to confirm if the problem persist as there is modification done in the kernel to fix the problem.

Ubuntu 8.10 (Intrepid Ibex)

1. Open the 'System->Preferences->Keyboard' dialog 2. Choose the 'Layouts' tab 3. Press 'Layout Options...' 4. Navigate to 'Miscellaneous compatibility options' 5. Enable the option: Swap keycodes of two keys when Mac keyboards are misdetected by kernel.

Mapping keys (Insert, Alt, Cmd, etc.)

This section describe how to change the mapping of key to better match PC's keyboard. e.g.: Swap the Alt key and Command key. The idea is to make the keyboard work more like a normal PC keyboard.

Adding a Second Control key

The command/apple keys on macs are recognized as "Super" or "Windows" shift by default. To make the right command key a ctrl key, save this in ~/.Xmodmap file:

clear control
clear mod4

keycode 37 = Control_L
keycode 134 = Control_R
!### change 134 to 116 if using Ubuntu hardy, not 8.10 or later. ###
add control = Control_L Control_R

add mod4 = Super_L

Then run the command "xmodmap ~/.Xmodmap".

Ubuntu 8.10 (Intrepid Ibex) through 10.04 (Lucid Lynx)

Save the following in a file .Xmodmap in your home directory:

! Swap Alt and Cmd keys.
keycode 37 =	Control_L
keycode 133 =	Alt_L Meta_L
keycode 64 =	Super_L
keycode 108 =	Super_R
keycode 134 =	ISO_Level3_Shift Multi_key
keycode 105 =	Control_R	Multi_key
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add    Shift   = Shift_L Shift_R
add    Lock    = Caps_Lock
add    Control = Control_L Control_R
add    Mod1    = Alt_L 0x007D
add    Mod2    = Num_Lock
add    Mod4    = Super_L Super_R
add    Mod5    = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift

! Configure '=' key on numpad as '='.
keycode 0x7D =  equal

Load the configuration by executing a command similar to the following.

xmodmap ~/.Xmodmap

Note : Gnome will ask you if you want to load this configuration the next time you log in.

Ubuntu 8.04 (Hardy Heron)

This section describe how to change the mapping for Ubuntu 8.04 (Hardy Heron) with kernel >= 2.6.27. 1. Edit or create ~/.Xmodmap file with a content similar to the following.

! Configure F13 as Insert key
! F14 as PrintScr
| F15 as ScrollLock
! F16 as Pause/Break
keycode 182 = Insert
keycode 183  =  Print       Sys_Req
keycode 184  =  Scroll_Lock
keycode 93   =  Pause   Break

! Swap Alt and Command keys
keycode 0x25 =  Control_L
keycode 0x73 =  Alt_L       Meta_L
keycode 0x40 =  Super_L
keycode 0x71 =  Super_R
keycode 0x74 =  ISO_Level3_Shift    Multi_key
keycode 0x75 =  NoSymbol
keycode 0x6D =  Control_R   Multi_key
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add    Shift   = Shift_L Shift_R
add    Lock    = Caps_Lock
add    Control = Control_L Control_R
add    Mod1    = Alt_L 0x007D
add    Mod2    = Num_Lock
add    Mod4    = Super_L Super_R
add    Mod5    = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift

! Configure '=' key on numpad as '='.
keycode 0x9D =  equal

2. Load the configuration by executing a command similar to the following.

xmodmap ~/.Xmodmap

Note : The configuration should be load on next logon.

Belgian Macintosh Keyboard Layout

Take a look at https://help.ubuntu.com/community/Macbook_Air#head-5fd0bcf04cc7da0b5241950916bab5d58cdb84da in the Belgian Keyboard section

Postscript

These issues may also apply for the Bluetooth aluminium Apple Wireless Keyboard.