;功能:输入法状态提示 ;f1强制中文 f2强制英文小写 capslock强制英文大写 ;环境:win10+搜狗输入法,输入法状态切换用默认的shift键。 ;作者:kazhafeizhale ;时间:2018年9月8日 ;参考来源 http://www.autoahk.com/archives/3278 #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance force startuplnk := A_StartMenu . "\Programs\Startup\自动化集合.lnk" Menu, Tray, Add, 开机启动,AutoStart if(FileExist(startuplnk)) Menu, Tray, Check, 开机启动 return AutoStart: if(FileExist(startuplnk)) FileDelete, % startuplnk else FileCreateShortcut, % A_ScriptFullpath, % startuplnk Menu, Tray, ToggleCheck, 开机启动 return XButton1::^c XButton2::^v F1:: SetCapsLockState,off switchime(0) switchime() return F2:: SetCapsLockState,off switchime(0) return CapsLock:: SetCapsLockState,on return switchime(ime := "A") { if (ime = 1){ DllCall("SendMessage", UInt, WinActive("A"), UInt, 80, UInt, 1, UInt, DllCall("LoadKeyboardLayout", Str,"00000804", UInt, 1)) }else if (ime = 0) { DllCall("SendMessage", UInt, WinActive("A"), UInt, 80, UInt, 1, UInt, DllCall("LoadKeyboardLayout", Str,, UInt, 1)) }else if (ime = "A") { ;ime_status:=DllCall("GetKeyboardLayout","int",0,UInt) Send, #{Space} }}
你好,我在WIN7状态下尝试,发现强制英文可以用,但强制中文跟CAPSLOCK好像都不好使了 🙁 。
请问如果我只想实现用F1切换英文,但保留现在搜狗的shift中英文切换(这样就不需要强制中文),要怎么做呢?谢谢
复制试试看,感谢大神
感谢大神,根据自己的习惯,修改成了左shit是中文,右shit是英文的状态
复制试试看,感谢大神
谢谢大神分享,学习