键盘映射
桌面栏: | ||
位置: | /boot/system/preferences/Keymap | |
设置: | ~/config/settings/Keymap/* - 用户修改后的键盘映射的位置 ~/config/settings/Key_map |
在面板右侧,键盘映射窗口显示了一个键盘。当你按下某个按键时,所要响应的按键将会变暗,然后指定的符号将会输入到底部的 Sample and Clipboard 文本框。您也可以从这儿复制里面的内容,将粘贴到文档中。
如此,键盘映射首选项不仅可以用于配置您的本地键盘映射,还可用于寻找其他语言的特殊符号。例如,您可以将键盘映射切换为"法语",找出 "ç" 然后将其复制到您邮件中的 François。(尽管您也可以在其他的键盘映射中找出 "cedil"...)
按下辅助按键,例如 SHIFT,CONTROL 或者 OPTION 来改变显示的键盘类型。
还有些按键的背景标记为蓝色,这些按键称为 Dead Keys ,它们可以改变您在按下它们之后所按下的按键。如果您点击了这些蓝色的按键,那些可以改变的按键显示为黄色;再次点击,所有的按键将恢复正常。例如 é,ñ,ó或者ë。
在键盘显示的下面,还有两个选项:
用于设置上述的蓝色按键。 | ||
用于使用 Windows/Linux 模式的快捷键,例如 CONTROL(通常为 CTRL)或者 Haiku 模式,例如 COMMAND(通常为 ALT)。 |
左边的列表提供了可用的系统预设值键盘映射,在它的下面还提供了可用的用户定义键盘映射。您可以通过拖拽来改变键盘映射:左键点击拖拽复制一个按键,而右键点击拖拽调换两个按键。
You can also create an individual mapping by drag & dropping a character from another app onto the key. For example, you could extend your regular keymap with often used currency symbols. Just click on the CONTROL key and drag & drop the pound symbol from CharacterMap onto the 'P' key to get a ₤ when you press CTRL P.
By right-clicking a normal key, the context menu offers to its mapping. Modifier keys can have alternative mappings, like using CAPS LOCK as CTRL key:
Alternatively to this or drag & dropping of keys, there's the menu
that opens this window:Here, you can assign keys to their respective roles or even completely disable the role of a key. You can even assign the same key to different roles, though that's not a good idea most of the time and you'll be warned by a small exclamation mark beside the pop-up menus if you do that.
Pressing applies your changes and closes the window.
When you're done you can save the result from the menu ~/config/settings/Keymap/. Otherwise you'll have to manually load it via
. Your modified map will only appear in the user-defined list if it's stored in为了使键盘映射面板更好的对应于您实际的键盘,在
菜单中有几个不同的设置可供选择。在键盘显示面板中的字体可以通过
菜单进行设置。需要注意的是,它可能不包含某种特别映射的所有符号。最后,有一个
按钮,它用于恢复设置到键盘映射首选项启动之前的状态。高级键盘映射操作
除了使用键盘映射首选项面板之外,还有一种方法可以用于定制键盘映射。它涉及到编辑包含十六进制值的文本文件,看起来难度很大,但是它并非无法掌握。
您可以在终端中使用下述命令卸载当前的键盘映射:
keymap -d > MyKeymap
The generated text file can then be opened in a text editor. Make sure to use a fixed font in that editor or you'll never grok that file…
At the beginning of that file, you'll find a legend of a stylized keyboard with the hex value corresponding to each key. Below that are the actual assignments of every value. You can do all the customizing that's also available from the Keymap preference panel, and then some. If you happen to have some special keys on your keyboard, you may be able to activate them. That is, use them as ordinary keys or like an option or control key. You won't be able to, for example, have your multimedia keys de/increase the volume or start some application. For this you can use the Shortcuts preferences.
在完成修改之后,为了保存文件,并且使系统启用修改后的键盘映射,您可以使用下述命令:
keymap -s < MyKeymap
如果您希望将该键盘映射引入映射面板,您必须首先将它编译为二进制格式:
keymap -c < MyKeymap
该命令将会创建一个文件 keymap.out,您可以通过 菜单载入键盘映射。还需要说明的是,keymap命令也可以载入该二进制格式: keymap -l < keymap.out
下面是卸载后的文件(为了使该页面有更好的显示效果,我们剪切了键盘最右边的按键设置):
#!/bin/keymap -s # # Raw key numbering for 101 keyboard... # # # [esc] [ f1] [ f2] [ f3] [ f4] [ f5] [ f6] [ f7] [ f8] [ f9] [f10] [f11] [f12] # 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d # # [ ` ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 0 ] [ - ] [ = ] [bck] # 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e # # [tab] [ q ] [ w ] [ e ] [ r ] [ t ] [ y ] [ u ] [ i ] [ o ] [ p ] [ [ ] [ ] ] [ \\ ] # 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 # # [cap] [ a ] [ s ] [ d ] [ f ] [ g ] [ h ] [ j ] [ k ] [ l ] [ ; ] [ ' ] [ enter ] # 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 # # [shift] [ z ] [ x ] [ c ] [ v ] [ b ] [ n ] [ m ] [ , ] [ . ] [ / ] [shift] # 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 # # [ctr] [cmd] [ space ] [cmd] [ctr] # 0x5c 0x5d 0x5e 0x5f 0x60 # # NOTE: On a Microsoft Natural Keyboard: # left option = 0x66 # right option = 0x67 # menu key = 0x68 # NOTE: On an Apple Extended Keyboard: # left option = 0x66 # right option = 0x67 # keypad '=' = 0x6a # power key = 0x6b Version = 3 CapsLock = 0x3b ScrollLock = 0x0f NumLock = 0x22 LShift = 0x4b RShift = 0x56 LCommand = 0x5d RCommand = 0x60 LControl = 0x5c RControl = 0x00 LOption = 0x66 ROption = 0x5f Menu = 0x68 # # Lock settings # To set NumLock, do the following: # LockSettings = NumLock # # To set everything, do the following: # LockSettings = CapsLock NumLock ScrollLock # LockSettings = # Legend: # n = Normal # s = Shift # c = Control # C = CapsLock # o = Option # Key n s c o os C Cs Co Cos Key 0x00 = '' '' '' '' '' '' '' '' '' Key 0x01 = 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b 0x1b Key 0x02 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x03 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x04 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x05 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x06 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x07 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x08 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x09 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x0a = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x0b = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x0c = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x0d = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x0e = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x0f = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x10 = 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 Key 0x11 = '^' 0xc2b0 '' ' ' '' '^' 0xc2b0 ' ' '' Key 0x12 = '1' '!' '' ' ' '' '!' '1' ' ' '' Key 0x13 = '2' '"' '' 0xc2b2 '' '"' '2' 0xc2b2 '' Key 0x14 = '3' 0xc2a7 '' 0xc2b3 '' 0xc2a7 '3' 0xc2b3 '' Key 0x15 = '4' '$' '' ' ' '' '$' '4' ' ' '' Key 0x16 = '5' '%' '' ' ' '' '%' '5' ' ' '' Key 0x17 = '6' '&' '' ' ' '' '&' '6' ' ' '' Key 0x18 = '7' '/' '' '{' '' '/' '7' '{' '' Key 0x19 = '8' '(' '' '[' '' '(' '8' '[' '' Key 0x1a = '9' ')' '' ']' '' ')' '9' ']' '' Key 0x1b = '0' '=' '' '}' '' '=' '0' '}' '' Key 0x1c = 0xc39f '?' '' '\\\\' '' '?' 0xc39f '\\\\' '' Key 0x1d = 0xc2b4 '`' '' ' ' '' 0xc2b4 '`' ' ' '' Key 0x1e = 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 Key 0x1f = 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 Key 0x20 = 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 Key 0x21 = 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b 0x0b Key 0x22 = '' '' '' '' '' '' '' '' '' Key 0x23 = '/' '/' '/' '/' '/' '/' '/' '/' '/' Key 0x24 = '*' '*' '*' '*' '*' '*' '*' '*' '*' Key 0x25 = '-' '-' '-' '-' '-' '-' '-' '-' '-' Key 0x26 = 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 0x09 Key 0x27 = 'q' 'Q' 0x11 '@' '' 'Q' 'q' '@' '' Key 0x28 = 'w' 'W' 0x17 ' ' '' 'W' 'w' ' ' '' Key 0x29 = 'e' 'E' 0x05 0xe282ac '' 'E' 'e' 0xe282ac '' Key 0x2a = 'r' 'R' 0x12 ' ' '' 'R' 'r' ' ' '' Key 0x2b = 't' 'T' 0x14 ' ' '' 'T' 't' ' ' '' Key 0x2c = 'z' 'Z' 0x1a ' ' '' 'Z' 'z' ' ' '' Key 0x2d = 'u' 'U' 0x15 ' ' '' 'U' 'u' ' ' '' Key 0x2e = 'i' 'I' 0x09 ' ' '' 'I' 'i' ' ' '' Key 0x2f = 'o' 'O' 0x0f ' ' '' 'O' 'o' ' ' '' Key 0x30 = 'p' 'P' 0x10 ' ' '' 'P' 'p' ' ' '' Key 0x31 = 0xc3bc 0xc39c 0x1b ' ' '' 0xc39c 0xc3bc ' ' '' Key 0x32 = ' ' '*' 0x1d '~' '' '*' ' ' '~' '' Key 0x33 = '#' '\\'' 0x1c ' ' '' '\\'' '#' ' ' '' Key 0x34 = 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f 0x7f Key 0x35 = 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 Key 0x36 = 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c 0x0c Key 0x37 = 0x01 '7' 0x01 0x01 '7' 0x01 '7' 0x01 '7' Key 0x38 = 0x1e '8' 0x1e 0x1e '8' 0x1e '8' 0x1e '8' Key 0x39 = 0x0b '9' 0x0b 0x0b '9' 0x0b '9' 0x0b '9' Key 0x3a = ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' Key 0x3b = '' '' '' '' '' '' '' '' '' Key 0x3c = 'a' 'A' 0x01 ' ' '' 'A' 'a' ' ' '' Key 0x3d = 's' 'S' 0x13 ' ' '' 'S' 's' ' ' '' Key 0x3e = 'd' 'D' 0x04 ' ' '' 'D' 'd' ' ' '' Key 0x3f = 'f' 'F' 0x06 ' ' '' 'F' 'f' ' ' '' Key 0x40 = 'g' 'G' 0x07 ' ' '' 'G' 'g' ' ' '' Key 0x41 = 'h' 'H' 0x08 ' ' '' 'H' 'h' ' ' '' Key 0x42 = 'j' 'J' 0x0a ' ' '' 'J' 'j' ' ' '' Key 0x43 = 'k' 'K' 0x0b ' ' '' 'K' 'k' ' ' '' Key 0x44 = 'l' 'L' 0x0c ' ' '' 'L' 'l' ' ' '' Key 0x45 = 0xc3b6 0xc396 '' ' ' '' 0xc396 0xc3b6 ' ' '' Key 0x46 = 0xc3a4 0xc384 '' ' ' '' 0xc384 0xc3a4 ' ' '' Key 0x47 = 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a Key 0x48 = 0x1c '4' 0x1c 0x1c '4' 0x1c '4' 0x1c '4' Key 0x49 = '' '5' '' '' '5' '' '5' '' '5' Key 0x4a = 0x1d '6' 0x1d 0x1d '6' 0x1d '6' 0x1d '6' Key 0x4b = '' '' '' '' '' '' '' '' '' Key 0x4c = 'y' 'Y' 0x19 ' ' '' 'Y' 'y' ' ' '' Key 0x4d = 'x' 'X' 0x18 ' ' '' 'X' 'x' ' ' '' Key 0x4e = 'c' 'C' 0x03 ' ' '' 'C' 'c' ' ' '' Key 0x4f = 'v' 'V' 0x16 ' ' '' 'V' 'v' ' ' '' Key 0x50 = 'b' 'B' 0x02 ' ' '' 'B' 'b' ' ' '' Key 0x51 = 'n' 'N' 0x0e ' ' '' 'N' 'n' ' ' '' Key 0x52 = 'm' 'M' 0x0d 0xc2b5 '' 'M' 'm' 0xc2b5 '' Key 0x53 = ',' ';' ',' ' ' '' ';' ',' ' ' '' Key 0x54 = '.' ':' '.' ' ' '' ':' '.' ' ' '' Key 0x55 = '-' '_' '' ' ' '' '-' '_' ' ' '' Key 0x56 = '' '' '' '' '' '' '' '' '' Key 0x57 = 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e Key 0x58 = 0x04 '1' 0x04 0x04 '1' 0x04 '1' 0x04 '1' Key 0x59 = 0x1f '2' 0x1f 0x1f '2' 0x1f '2' 0x1f '2' Key 0x5a = 0x0c '3' 0x0c 0x0c '3' 0x0c '3' 0x0c '3' Key 0x5b = 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a Key 0x5c = '' '' '' '' '' '' '' '' '' Key 0x5d = '' '' '' '' '' '' '' '' '' Key 0x5e = ' ' ' ' 0x00 ' ' ' ' ' ' ' ' ' ' ' ' Key 0x5f = '' '' '' '' '' '' '' '' '' Key 0x60 = '' '' '' '' '' '' '' '' '' Key 0x61 = 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c 0x1c Key 0x62 = 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f 0x1f Key 0x63 = 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d 0x1d Key 0x64 = 0x05 '0' 0x05 0x05 '0' 0x05 '0' 0x05 '0' Key 0x65 = 0x7f ',' 0x7f 0x7f ',' 0x7f ',' 0x7f ',' Key 0x66 = '' '' '' '' '' '' '' '' '' Key 0x67 = '' '' '' '' '' '' '' '' '' Key 0x68 = '' '' '' '' '' '' '' '' '' Key 0x69 = '<' '>' '' '|' '' '<' '>' '|' '' Key 0x6a = '' '' '' '' '' '' '' '' '' Key 0x6b = '' '' '' '' '' '' '' '' '' Key 0x6c = '' '' '' '' '' '' '' '' '' Key 0x6d = '' '' '' '' '' '' '' '' '' Key 0x6e = '' '' '' '' '' '' '' '' '' Key 0x6f = '' '' '' '' '' '' '' '' '' Key 0x70 = '' '' '' '' '' '' '' '' '' Key 0x71 = '' '' '' '' '' '' '' '' '' Key 0x72 = '' '' '' '' '' '' '' '' '' Key 0x73 = '' '' '' '' '' '' '' '' '' Key 0x74 = '' '' '' '' '' '' '' '' '' Key 0x75 = '' '' '' '' '' '' '' '' '' Key 0x76 = '' '' '' '' '' '' '' '' '' Key 0x77 = '' '' '' '' '' '' '' '' '' Key 0x78 = '' '' '' '' '' '' '' '' '' Key 0x79 = '' '' '' '' '' '' '' '' '' Key 0x7a = '' '' '' '' '' '' '' '' '' Key 0x7b = '' '' '' '' '' '' '' '' '' Key 0x7c = '' '' '' '' '' '' '' '' '' Key 0x7d = '' '' '' '' '' '' '' '' '' Key 0x7e = '' '' '' '' '' '' '' '' '' Key 0x7f = '' '' '' '' '' '' '' '' '' Acute ' ' = 0xc2b4 Acute 'A' = 0xc381 Acute 'E' = 0xc389 Acute 'I' = 0xc38d Acute 'O' = 0xc393 Acute 'U' = 0xc39a Acute 'Y' = 0xc39d Acute 'a' = 0xc3a1 Acute 'e' = 0xc3a9 Acute 'i' = 0xc3ad Acute 'o' = 0xc3b3 Acute 'u' = 0xc3ba Acute 'y' = 0xc3bd Acute '' = '' Acute '' = '' Acute '' = '' AcuteTab = Normal Shift Option Option-Shift CapsLock CapsLock-Shift CapsLock-Option CapsLock-Option-Shift Grave ' ' = '`' Grave 'A' = 0xc380 Grave 'E' = 0xc388 Grave 'I' = 0xc38c Grave 'O' = 0xc392 Grave 'U' = 0xc399 Grave 'a' = 0xc3a0 Grave 'e' = 0xc3a8 Grave 'i' = 0xc3ac Grave 'o' = 0xc3b2 Grave 'u' = 0xc3b9 Grave '' = '' Grave '' = '' Grave '' = '' Grave '' = '' Grave '' = '' GraveTab = Normal Shift Option Option-Shift CapsLock CapsLock-Shift CapsLock-Option CapsLock-Option-Shift Circumflex ' ' = '^' Circumflex 'A' = 0xc382 Circumflex 'E' = 0xc38a Circumflex 'I' = 0xc38e Circumflex 'O' = 0xc394 Circumflex 'U' = 0xc39b Circumflex 'a' = 0xc3a2 Circumflex 'e' = 0xc3aa Circumflex 'i' = 0xc3ae Circumflex 'o' = 0xc3b4 Circumflex 'u' = 0xc3bb Circumflex '' = '' Circumflex '' = '' Circumflex '' = '' Circumflex '' = '' Circumflex '' = '' CircumflexTab = Normal Shift Option Option-Shift CapsLock CapsLock-Shift CapsLock-Option CapsLock-Option-Shift Diaeresis ' ' = 0xc2a8 Diaeresis 'A' = 0xc384 Diaeresis 'E' = 0xc38b Diaeresis 'I' = 0xc38f Diaeresis 'O' = 0xc396 Diaeresis 'U' = 0xc39c Diaeresis 'Y' = 0xc5b8 Diaeresis 'a' = 0xc3a4 Diaeresis 'e' = 0xc3ab Diaeresis 'i' = 0xc3af Diaeresis 'o' = 0xc3b6 Diaeresis 'u' = 0xc3bc Diaeresis 'y' = 0xc3bf Diaeresis '' = '' Diaeresis '' = '' Diaeresis '' = '' DiaeresisTab = Normal Shift Option Option-Shift CapsLock CapsLock-Shift CapsLock-Option CapsLock-Option-Shift Tilde ' ' = '~' Tilde 'A' = 0xc383 Tilde 'O' = 0xc395 Tilde 'N' = 0xc391 Tilde 'a' = 0xc3a3 Tilde 'o' = 0xc3b5 Tilde 'n' = 0xc3b1 Tilde '' = '' Tilde '' = '' Tilde '' = '' Tilde '' = '' Tilde '' = '' Tilde '' = '' Tilde '' = '' Tilde '' = '' Tilde '' = '' TildeTab = Normal Shift Option Option-Shift CapsLock CapsLock-Shift CapsLock-Option CapsLock-Option-Shift