Skip to content

Instantly share code, notes, and snippets.

@satackey
Last active September 9, 2023 15:13
Show Gist options
  • Save satackey/4ceadc8a1289913b048680555a9b046b to your computer and use it in GitHub Desktop.
Save satackey/4ceadc8a1289913b048680555a9b046b to your computer and use it in GitHub Desktop.
autohotkey
; https://chat.openai.com/share/7317d08c-e7fd-4c15-9f77-5a5d40419059
; AutoHotKey をつかって、つぎのことを行うスクリプトを作成してください
; 左右のWindows キーとControlキーを入れ替えます
; 左物理 Windows キー・入れ替え後の左 Ctrl キーを押して離した(空打ち)際に、vk1Dsc07B を Send します
; 右物理 Windows キー・入れ替え後の右 Ctrl キーを押して離した(空打ち)際に、vk1Csc079を Send します
; Windows キーの空打ちやショートカット、Ctrl キーのショートカットを正しく動作するようにしてください
; ----------
; 左Windows キーを左Ctrl キーにマッピング
LWin::
Send, {LCtrl Down}
KeyWait, LWin
Send, {LCtrl Up}
; 空打ちの判定
if (A_PriorKey = "LWin")
Send, {vk1Dsc07B}
return
; 右Windows キーを右Ctrl キーにマッピング
RWin::
Send, {RCtrl Down}
KeyWait, RWin
Send, {RCtrl Up}
; 空打ちの判定
if (A_PriorKey = "RWin")
Send, {vk1Csc079}
return
; 左Ctrl キーを左Windows キーにマッピング
LCtrl::LWin
; 右Ctrl キーを右Windows キーにマッピング
RCtrl::RWin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment