RT,就是小键盘完全没用,输入不了数字,只能用大键盘上的数字键输入数字,但是大部分软件用小键盘是没问题的。想用键盘映射,又不知道怎么弄,求支个招
1
Yvette 2014-12-29 12:28:35 +08:00
或许你需要Karabiner的NumPad Hack,默认打开的
|
2
Showfom 2014-12-29 12:56:52 +08:00
.zshrc 里添加
# Fix numeric keypad # 0 . Enter bindkey -s "^[Op" "0" bindkey -s "^[On" "." bindkey -s "^[OM" "^M" # 1 2 3 bindkey -s "^[Oq" "1" bindkey -s "^[Or" "2" bindkey -s "^[Os" "3" # 4 5 6 bindkey -s "^[Ot" "4" bindkey -s "^[Ou" "5" bindkey -s "^[Ov" "6" # 7 8 9 bindkey -s "^[Ow" "7" bindkey -s "^[Ox" "8" bindkey -s "^[Oy" "9" # + - * / bindkey -s "^[Ol" "+" bindkey -s "^[Om" "-" bindkey -s "^[Oj" "*" bindkey -s "^[Oo" "/" 这样 zsh 就可以小键盘了 |
3
Showfom 2014-12-29 12:58:09 +08:00
其他的程序不支持小键盘就是程序问题了,建议和作者多反应下。
|
5
yellowV2ex 2014-12-29 14:06:23 +08:00
那什么百度拼音就不支持
|
6
pheyer OP @Yvette 其实上午弄过Karabiner,但是不得要领,不知道怎么映射。刚才研究了一下,成功搞定,其实也很简单,就是把小键盘上的数字键映射成大键盘上的数字键。
我做的private.xml代码如下: <?xml version="1.0"?> <root> <item> <name>Change KeyPad 0 to Num 0</name> <identifier>private.change_keypad0_to_num0</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_0, KeyCode::KEY_0</autogen> </item> <item> <name>Change KeyPad 1 to Num 1</name> <identifier>private.change_keypad1_to_num1</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_1, KeyCode::KEY_1</autogen> </item> <item> <name>Change KeyPad 2 to Num 2</name> <identifier>private.change_keypad2_to_num2</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_2, KeyCode::KEY_2</autogen> </item> <item> <name>Change KeyPad 3 to Num 3</name> <identifier>private.change_keypad3_to_num3</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_3, KeyCode::KEY_3</autogen> </item> <item> <name>Change KeyPad 4 to Num 4</name> <identifier>private.change_keypad4_to_num4</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_4, KeyCode::KEY_4</autogen> </item> <item> <name>Change KeyPad 5 to Num 5</name> <identifier>private.change_keypad5_to_num5</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_5, KeyCode::KEY_5</autogen> </item> <item> <name>Change KeyPad 6 to Num 6</name> <identifier>private.change_keypad6_to_num6</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_6, KeyCode::KEY_6</autogen> </item> <item> <name>Change KeyPad 7 to Num 7</name> <identifier>private.change_keypad7_to_num7</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_7, KeyCode::KEY_7</autogen> </item> <item> <name>Change KeyPad 8 to Num 8</name> <identifier>private.change_keypad8_to_num8</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_8, KeyCode::KEY_8</autogen> </item> <item> <name>Change KeyPad 9 to Num 9</name> <identifier>private.change_keypad9_to_num9</identifier> <autogen>__KeyToKey__ KeyCode::KEYPAD_9, KeyCode::KEY_9</autogen> </item> <item> <name>Change KeyPad Enter to Return</name> <identifier>private.change_keypadEnter_to_return</identifier> <autogen>__KeyToKey__ KeyCode::ENTER, KeyCode::RETURN</autogen> </item> </root> 我参考的资料: How to add your own settings: https://pqrs.org/osx/karabiner/document.html.en#privatexml private.xml参考手册: https://pqrs.org/osx/karabiner/xml.html.en |
7
pheyer OP @yellowV2ex 百度就是朵奇葩
|