Mac键盘修改F1-F12为功能键,神器karabiner-elements

弄了个宁芝键盘,这个键盘的Mac模式右下角command对不上就算了,还得没有功能键,不过用起来确实舒服

京造的K8不得不说,学习成本低太多,基本就是一个Mac键盘。

于是在网上看到这个软件,也是折腾了好久才搞定, 给大家分享一下

下面会提供json文件,直接复制过去,就能实现我的功能,然后还可以自己对应修改想要的

主要是通过karabiner-elements软件,实现按键映射。

实现操作:

这里F5和F12我保留了,因为也没有那么多功能键要添加,就留了两个可能会用到的F键。

F1----F12所有键均改为----->左侧shift+F1---F12

修改的时候可以打开一个在线的键盘测试网页,这样就知道自己的修改有没有生效

1、安装软件:

这个网上一大堆,下载汉化版或者英文原版都可以。下载安装后会生成两个程序,EvenViewer这个用不到,不用管,直接打开Elements

2、打开软件

这个直接到选择设备,把要修改的键盘选上,我这里还有K8,所以要进行区分,这样就不会影响K8原本的配置了

3、修改配置文件

  • 选好后转到配置文件

    • 直接把配置文件名字改了

    • 这里就改成karabiner.json

  • 打开其他

    • 打开配置文件位置

    • 打开后如图

    • 会有好多文件,其他的不用管,直接打开karabiner.json,如果没有就直接创建一个。

    • 打开后复制我写好的代码进去,保存关闭,即可生效;

        
{
     "global": {
         "check_for_updates_on_startup": true,
         "show_in_menu_bar": true,
         "show_profile_name_in_menu_bar": false
     },
     "profiles": [
         {
             "complex_modifications": {
                 "parameters": {
                     "basic.simultaneous_threshold_milliseconds": 50,
                     "basic.to_delayed_action_delay_milliseconds": 500,
                     "basic.to_if_alone_timeout_milliseconds": 1000,
                     "basic.to_if_held_down_threshold_milliseconds": 500,
                     "mouse_motion_to_scroll.speed": 100
                 },
                 "rules": [
                     {
                         "description": "Mapping [left_o0,F11,F12}",
                         "manipulators": [
                             {
                                 "from": {
                                     "key_code": "f1",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f1"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f2",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f2"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f3",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f3"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f4",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f4"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f5",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f5"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f6",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f6"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f7",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f7"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f8",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f8"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f9",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f9"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f10",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f10"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f11",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f11"
                                     }
                                 ],
                                 "type": "basic"
                             },
                             {
                                 "from": {
                                     "key_code": "f12",
                                     "modifiers": {
                                         "mandatory": [
                                             "left_shift"
                                         ],
                                         "optional": [
                                             "any"
                                         ]
                                     }
                                 },
                                 "to": [
                                     {
                                         "key_code": "f12"
                                     }
                                 ],
                                 "type": "basic"
                             }
                         ]
                     }
                 ]
             },
             "devices": [
                 {
                     "disable_built_in_keyboard_if_exists": false,
                     "fn_function_keys": [],
                     "identifiers": {
                         "is_keyboard": true,
                         "is_pointing_device": true,
                         "product_id": 272,
                         "vendor_id": 1452
                     },
                     "ignore": false,
                     "manipulate_caps_lock_led": true,
                     "simple_modifications": []
                 },
                 {
                     "disable_built_in_keyboard_if_exists": false,
                     "fn_function_keys": [],
                     "identifiers": {
                         "is_keyboard": true,
                         "is_pointing_device": false,
                         "product_id": 834,
                         "vendor_id": 1452
                     },
                     "ignore": true,
                     "manipulate_caps_lock_led": true,
                     "simple_modifications": []
                 },
                 {
                     "disable_built_in_keyboard_if_exists": false,
                     "fn_function_keys": [],
                     "identifiers": {
                         "is_keyboard": true,
                         "is_pointing_device": false,
                         "product_id": 45890,
                         "vendor_id": 1133
                     },
                     "ignore": true,
                     "manipulate_caps_lock_led": false,
                     "simple_modifications": []
                 }
             ],
             "fn_function_keys": [
                 {
                     "from": {
                         "key_code": "f1"
                     },
                     "to": {
                         "apple_vendor_keyboard_key_code": "mission_control"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f2"
                     },
                     "to": {
                         "apple_vendor_keyboard_key_code": "launchpad"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f3"
                     },
                     "to": {
                         "consumer_key_code": "display_brightness_decrement"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f4"
                     },
                     "to": {
                         "consumer_key_code": "display_brightness_increment"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f5"
                     },
                     "to": {
                         "key_code": "f5"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f6"
                     },
                     "to": {
                         "consumer_key_code": "rewind"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f7"
                     },
                     "to": {
                         "consumer_key_code": "fast_forward"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f8"
                     },
                     "to": {
                         "consumer_key_code": "play_or_pause"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f9"
                     },
                     "to": {
                         "consumer_key_code": "mute"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f10"
                     },
                     "to": {
                         "consumer_key_code": "volume_decrement"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f11"
                     },
                     "to": {
                         "consumer_key_code": "volume_increment"
                     }
                 },
                 {
                     "from": {
                         "key_code": "f12"
                     },
                     "to": {
                         "key_code": "f12"
                     }
                 }
             ],
             "name": "karabiner.json",
             "parameters": {
                 "delay_milliseconds_before_open_device": 1000
             },
             "selected": true,
             "simple_modifications": [],
             "virtual_hid_keyboard": {
                 "country_code": 0,
                 "mouse_key_xy_scale": 100
             }
         }
     ],
     "title": "Mapping [left_shift+{F1-F10,F11,F12} to {F1-F10,F11,F12}"
 }

至此配置就全部结束了,可以实现功能键操作

4、功能键贴纸

然后我在网上买了个功能键贴纸,但是还没到货,就先给大家放个图,等到了贴上去再发实图

perfect!哈哈哈哈哈哈哈

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值