📜  键盘布局 ahk - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:07.691000             🧑  作者: Mango

代码示例1
F9::
SetFormat, Integer, H
aac1:= % DllCall("GetKeyboardLayout", Int,DllCall("GetWindowThreadProcessId", int,WinActive("A"), Int,0))
msgbox,AAC1=%aac1%
SetFormat, Integer, D
Clipboard=%aac1%
return

F10::
switch aac1{
            case "-0xFFDF7F7":{ ; Your remap for dvorak
               Tooltip, Dvorak/us layout selected!
               ^q::^x   ;# cut
               ^j::^c   ;# copy
               ^k::^v   ;# pase
               return
            } 
               
            case "0x8090809":{ ; Your remap for Default
               Tooltip, Uk layout selected!
               ^x::^x   ;# cut
               ^c::^c   ;# copy
               ^v::^v   ;# pase
               return
            }
            
               case "0x4090409":{ ; Your remap for Default
               Tooltip, Us layout selected!
               ^x::^x   ;# cut
               ^c::^c   ;# copy
               ^v::^v   ;# pase
               return
            } 
} 
return