尽可能的还原 macOS 操作习惯到 Windows 【未完待续】
由于之前一直用自己的 MacbookPro 开发,工作中也一直用的它,换工作之后公司有配置更高的 Windows,所以目前就换成了 Windows。
但有个问题是 macOS 与 Windows 的操作习惯相差太大,以至于习惯 Windows 之后 macOS 又不习惯了。
所以我一直在为平衡这两个平台的操作习惯而努力,尽可能的还原 macOS 的操作习惯,因为我生活学习还是要用 macOS 的。
原因嘛,就是因为 iPhone 与 macOS 之间传东西方便,同步音乐方便。
一、需要的软件和硬件
硬件:
- 蓝牙适配器
- MagicKeyboard 2
软件:
软件名 | 用处 | 下载地址 |
---|---|---|
cmder | 模拟 Linux 终端,使用 Linux 指令 | https://cmder.net/ |
Wox | 模拟 macOS 启动器 | https://github.com/Wox-launcher/Wox/releases |
AutoHotkey | 生成组合键效果 | https://www.autohotkey.com/ |
MapKeyboard.exe | 映射键盘 ctrl -> command | https://kylebing.cn/download/files/mapkeyboard.zip |
二、同步键盘键位
最主要的还是 windows 上的 ctrl键 与 macOS 上的 command 键的同步。
这里就需要使用 MapKeyboard.exe
这个软件,来把 LWin 改成 LCtrl, 这样键盘上的 Commond就成了 Ctrl 了,
Ctrl + C 与 Ctrl + V 都可以正常使用了。
AutoHotKey 脚本
; # Windows
; ! Alt
; ^ Ctrl
; + Shift
; & 组合快捷键连接符
; -----------------
; 例子
; -----------------
; ^j::
; Send, My First Script
; return
; The first line: ^j:: is the hotkey. ^ means Ctrl, j is the letter J. Anything to the left of :: are the keys you need to press.
; The second line: Send, My First Script is how you send keystrokes. Send is the command, anything after the comma (,) will be typed.
; The third line: return. This will become your best friend. It literally stops code from going any further, to the lines below. This will prevent many issues when you start having a lot of stuff in your scripts.
; -------------------
; 切换上一个程序
; 映射 Command + Tab
^Tab::
Send, !{Tab}
return
; 退出程序
; 映射 macOS 的 Command + Q
^q::
Send, !{F4}
return
; terminal 取消
; 映射 macOS 的 Ctrl + C
#c::
Send, ^{c}
return
^Backspace::
Send, {Delete}
return
; 打开浏览器调试窗口
; 映射: command + option + I = F12
^!i::
Send, {F12}
return
;媒体键参考
; AutoHotkey Media Keys
;^!Space::Send {Media_Play_Pause}
;^!Left::Send {Media_Prev}
;^!Right::Send {Media_Next}
;^!NumpadMult::Send {Volume_Mute}
;^!NumpadAdd::Send {Volume_Up}
;^!NumpadSub::Send {Volume_Down}