个人工具
登录
查看“UbuntuHelp:AppleKeyboard”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:AppleKeyboard”的源代码
来自Ubuntu中文
←
UbuntuHelp:AppleKeyboard
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/AppleKeyboard}} {{Languages|UbuntuHelp:AppleKeyboard}} == 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: * 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]) * 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.: <pre><nowiki> sudo gedit /etc/modprobe.d/options </nowiki></pre> * Add the line: '''options hid pb_fnmode=0''' * Save the file and execute the following command: <pre><nowiki> sudo update-initramfs -u </nowiki></pre> * Reboot Alternatively, you can modify '''/etc/rc.local''' to similar effect. * Edit the '''/etc/rc.local''' file: <pre><nowiki> sudo gedit /etc/rc.local </nowiki></pre> * Add this line to the end of the file: <pre><nowiki> echo 2 > /sys/module/hid/parameters/pb_fnmode </nowiki></pre> === 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: <pre><nowiki> ! 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 </nowiki></pre> For Ubuntu 8.10 (Intrepid): <pre><nowiki> ! 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 </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 <pre><nowiki> xmodmap ~/.Xmodmap </nowiki></pre> 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. ---- [[category:CategoryHardware]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:AppleKeyboard
。