特殊:Badtitle/NS100:AppleKeyboard
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/AppleKeyboard }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/af | • {{#if: UbuntuHelp:AppleKeyboard|Afrikaans| [[::AppleKeyboard/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ar | • {{#if: UbuntuHelp:AppleKeyboard|العربية| [[::AppleKeyboard/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/az | • {{#if: UbuntuHelp:AppleKeyboard|azərbaycanca| [[::AppleKeyboard/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/bcc | • {{#if: UbuntuHelp:AppleKeyboard|جهلسری بلوچی| [[::AppleKeyboard/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/bg | • {{#if: UbuntuHelp:AppleKeyboard|български| [[::AppleKeyboard/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/br | • {{#if: UbuntuHelp:AppleKeyboard|brezhoneg| [[::AppleKeyboard/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ca | • {{#if: UbuntuHelp:AppleKeyboard|català| [[::AppleKeyboard/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/cs | • {{#if: UbuntuHelp:AppleKeyboard|čeština| [[::AppleKeyboard/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/de | • {{#if: UbuntuHelp:AppleKeyboard|Deutsch| [[::AppleKeyboard/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/el | • {{#if: UbuntuHelp:AppleKeyboard|Ελληνικά| [[::AppleKeyboard/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/es | • {{#if: UbuntuHelp:AppleKeyboard|español| [[::AppleKeyboard/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/fa | • {{#if: UbuntuHelp:AppleKeyboard|فارسی| [[::AppleKeyboard/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/fi | • {{#if: UbuntuHelp:AppleKeyboard|suomi| [[::AppleKeyboard/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/fr | • {{#if: UbuntuHelp:AppleKeyboard|français| [[::AppleKeyboard/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/gu | • {{#if: UbuntuHelp:AppleKeyboard|ગુજરાતી| [[::AppleKeyboard/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/he | • {{#if: UbuntuHelp:AppleKeyboard|עברית| [[::AppleKeyboard/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/hu | • {{#if: UbuntuHelp:AppleKeyboard|magyar| [[::AppleKeyboard/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/id | • {{#if: UbuntuHelp:AppleKeyboard|Bahasa Indonesia| [[::AppleKeyboard/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/it | • {{#if: UbuntuHelp:AppleKeyboard|italiano| [[::AppleKeyboard/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ja | • {{#if: UbuntuHelp:AppleKeyboard|日本語| [[::AppleKeyboard/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ko | • {{#if: UbuntuHelp:AppleKeyboard|한국어| [[::AppleKeyboard/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ksh | • {{#if: UbuntuHelp:AppleKeyboard|Ripoarisch| [[::AppleKeyboard/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/mr | • {{#if: UbuntuHelp:AppleKeyboard|मराठी| [[::AppleKeyboard/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ms | • {{#if: UbuntuHelp:AppleKeyboard|Bahasa Melayu| [[::AppleKeyboard/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/nl | • {{#if: UbuntuHelp:AppleKeyboard|Nederlands| [[::AppleKeyboard/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/no | • {{#if: UbuntuHelp:AppleKeyboard|norsk| [[::AppleKeyboard/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/oc | • {{#if: UbuntuHelp:AppleKeyboard|occitan| [[::AppleKeyboard/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/pl | • {{#if: UbuntuHelp:AppleKeyboard|polski| [[::AppleKeyboard/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/pt | • {{#if: UbuntuHelp:AppleKeyboard|português| [[::AppleKeyboard/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ro | • {{#if: UbuntuHelp:AppleKeyboard|română| [[::AppleKeyboard/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/ru | • {{#if: UbuntuHelp:AppleKeyboard|русский| [[::AppleKeyboard/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/si | • {{#if: UbuntuHelp:AppleKeyboard|සිංහල| [[::AppleKeyboard/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/sq | • {{#if: UbuntuHelp:AppleKeyboard|shqip| [[::AppleKeyboard/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/sr | • {{#if: UbuntuHelp:AppleKeyboard|српски / srpski| [[::AppleKeyboard/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/sv | • {{#if: UbuntuHelp:AppleKeyboard|svenska| [[::AppleKeyboard/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/th | • {{#if: UbuntuHelp:AppleKeyboard|ไทย| [[::AppleKeyboard/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/tr | • {{#if: UbuntuHelp:AppleKeyboard|Türkçe| [[::AppleKeyboard/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/vi | • {{#if: UbuntuHelp:AppleKeyboard|Tiếng Việt| [[::AppleKeyboard/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/yue | • {{#if: UbuntuHelp:AppleKeyboard|粵語| [[::AppleKeyboard/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/zh | • {{#if: UbuntuHelp:AppleKeyboard|中文| [[::AppleKeyboard/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/zh-hans | • {{#if: UbuntuHelp:AppleKeyboard|中文(简体)| [[::AppleKeyboard/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AppleKeyboard | UbuntuHelp:AppleKeyboard | {{#if: | :}}AppleKeyboard}}/zh-hant | • {{#if: UbuntuHelp:AppleKeyboard|中文(繁體)| [[::AppleKeyboard/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:AppleKeyboard|:AppleKeyboard|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :AppleKeyboard/zh | | {{#ifexist: AppleKeyboard/zh | | {{#ifeq: {{#titleparts:AppleKeyboard|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:AppleKeyboard|1|-1|}} | zh | | }}
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)
- 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 #201887)
- Two keys are swapped on international (non-US) keyboard with respect to the printing on the keycaps. (Ubuntu bug #214786)
- 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.
Corrections
Correcting the Function Key and Num Lock issue
- Edit the file /etc/modprobe.d/options, e.g.:
sudo gedit /etc/modprobe.d/options
- Add the line: options hid pb_fnmode=0
- Save the file and execute the following command:
sudo update-initramfs -u
- 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
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. For Ubuntu 8.04 (Hardy) with kernel >= 2.6.27:
! Configure F13 as Insert key, F14 as PrintScr, F15 as ScrollLock ! and F16 as Pause/Break. keycode 182 = Insert keycode 183 = Print Sys_Req keycode 184 = Scroll_Lock keycode 93 = Pause Break ! Swap Alt and Cmd 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 = 0 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
For Ubuntu 8.10 (Intrepid):
! Configure F13 as Insert key, F14 as PrintScr, F15 as ScrollLock ! and F16 as Pause/Break. keycode 191 = Insert keycode 192 = Print Sys_Req keycode 193 = Scroll_Lock keycode 194 = Pause Break keycode 195 = XF86AudioMute keycode 196 = XF86AudioPrev keycode 197 = XF86AudioNext ! 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 = 0 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
After the next login the keys should function as described in the file. You can also manually activate the new layout by calling
xmodmap ~/.Xmodmap
from the command line.
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
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.