未经许可,请勿转载,谢谢合作
PS:按照这个快捷键用了一下午,小拇指好累呀,平心而论,像这种辅助键最好交给工作量较少的大拇指来做才好。以下内容可供开发参考,快捷按键指法有待商榷。
mac下的键盘映射软件,患有懒癌的我现在已经懒得去挪动手臂去按 箭头了,karabiner可以帮助我实现这个愿望
个人设置配置方法,找到路径 userName ▸ .config ▸ karabiner ▸ assets ▸ complex_modifications
这个文件夹用来配置复杂映射,进入后放入.json文件
贴入配置代码(代码较长,不适合贴在网页上,各位自己去看吧)
1. 下面代码表示为,将caps_lock键映射为right_command键,这么做因为caps_lock真的很鸡肋,平时写大写基本是使用left_shift。然后 right_command + i/j/k/l 分别代表 右侧的command键加i/j/k/l映射为上、左、下、右。具体关于为什么不是用left_command,因为left_command在系统中有很多可靠的绑定过的快捷键了。再问为什么使用caps_lock来替换right_command,因为换了键盘,空格键被延长了很多,right_command不好按呀!:
{ "title": "Diamond Cursor", "rules": [ { "description": "Capslock to right command (caps_lock to right_command)", "manipulators": [ { "from": { "key_code": "caps_lock", "modifiers": { "optional": [ "any" ] } }, "to": [ { "key_code": "right_command" } ], "type": "basic" } ] }, { "description": "Change right_command+i/j/k/l to Arrows", "manipulators": [ { "type": "basic", "from": { "key_code": "j", "modifiers": { "mandatory": [ "right_command" ], "optional": [ "any" ] } }, "to": [ { "key_code": "left_arrow" } ] }, { "type": "basic", "from": { "key_code": "k", "modifiers": { "mandatory": [ "right_command" ], "optional": [ "any" ] } }, "to": [ { "key_code": "down_arrow" } ] }, { "type": "basic", "from": { "key_code": "i", "modifiers": { "mandatory": [ "right_command" ], "optional": [ "any" ] } }, "to": [ { "key_code": "up_arrow" } ] }, { "type": "basic", "from": { "key_code": "l", "modifiers": { "mandatory": [ "right_command" ], "optional": [ "any" ] } }, "to": [ { "key_code": "right_arrow" } ] } ] } ]}
2. 关于mandatory(强制性)参数的理解,可以理解为,当按下key_code时,判断是否在mandatory的基础下,例如:
下面的代码为 在按下空格时,会判断是否按下right_command,如果确认是按下了right_command,则表现为delete_or_backspace
{ "description": "Capslock and Space => backspace", "manipulators": [ { "type": "basic", "from": { "key_code": "spacebar", "modifiers": { "mandatory": [ "right_command" ], "optional": [ "spacebar" ] } }, "to": [ { "key_code": "delete_or_backspace" } ], "type": "basic" } ] }
3. 介于mac的多屏切换需要手在触控板上划来划去,但是苦于用外接键盘,如果需要换屏的话,还要用ctrl+arraw来进行操作比较“拗手”,所以添加较为复杂的映射,将caps_lock + u/o映射为left_ctrl + left/right_arrow,配置完成后,可以流畅的切换了:
{ "description": "right_command+u/o to 切换屏幕(change screen)", "manipulators": [ { "type": "basic", "from": { "key_code": "u", "modifiers": { "mandatory": [ "right_command" ], "optional": [ "any" ] } }, "to": [ { "key_code": "left_arrow", "modifiers": [ "left_control" ] } ] }, { "type": "basic", "from": { "key_code": "o", "modifiers": { "mandatory": [ "right_command" ], "optional": [ "any" ] } }, "to": [ { "key_code": "right_arrow", "modifiers": [ "left_control" ] } ] } ] }
然后点击左下角的添加规则
点击右侧的enable就可以了,如果没有效果,可以选择complex_modifications右侧的devices查看是否自己当前使用的设备被添加
接下来去了解下,如何将鼠标快速移动到另外的屏幕中间去,文章将会不断更新
开始捣鼓罗技craft sdk开发了,哈哈哈哈哈哈哈哈哈哈,爽歪歪歪歪歪歪歪