Skip to content

Commit

Permalink
feat: 完善输入法模式等更新
Browse files Browse the repository at this point in the history
  • Loading branch information
abgox committed Jan 15, 2025
1 parent 2f8815d commit 4d8a7d8
Show file tree
Hide file tree
Showing 65 changed files with 590 additions and 317 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
InputTipCursor
InputTipSymbol
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- 默认中文状态为 **红色**,英文状态为 **蓝色**,大写锁定为 **绿色**
-[更多已适配的鼠标样式](https://inputtip.pages.dev/download/extra) 中有提供它们的左手镜像版本
- 根据输入法状态在输入光标附近显示不同的 [符号](#关于符号)
- 默认使用 [白名单机制](https://inputtip.pages.dev/FAQ/about-white-list/)
- 默认使用 [白名单机制](https://inputtip.pages.dev/FAQ/white-list/)
- 切换不同应用窗口时,自动切换指定的输入法状态(中文/英文/大写锁定)
- 快捷键强制切换输入法状态
- 详尽的自定义配置菜单
Expand Down Expand Up @@ -321,12 +321,17 @@

- `【自定义】模式`

- 一个万能的模式,需要根据实际情况设置状态码和切换码
- 详情参考: [关于【自定义】模式](https://inputtip.pages.dev/FAQ/about-input-mode-custom)
- `设置输入法模式` => `自定义` 进行配置:
- [小狼毫(rime)输入法](https://rime.im/download/): 勾选 `切换码规则` 中的 `使用偶数`
- [讯飞输入法](https://srf.xunfei.cn/): 勾选 `状态码规则` 中的 `使用奇数`
- [手心输入法](https://www.xinshuru.com/): 在 `切换码数字`的输入框中填入 `1`
- 一个万能的模式,需要根据实际情况设置状态码(规则)和切换码(规则)
- 详情参考: [关于【自定义】模式](https://inputtip.pages.dev/FAQ/custom-input-mode)
- 可以通过 `设置输入法模式` => `自定义` 使用以下已知可用的配置:
- [小鹤音形](https://flypy.com/download/)
- 经过测试,`v10.11.4` 版本中,在 `切换码数字`的输入框中填入 `257` 即可
- [小狼毫(rime)输入法](https://rime.im/download/)
- 经过测试,`v0.16.1` 版本中,勾选 `切换码规则` 中的 `使用偶数` 即可
- [讯飞输入法](https://srf.xunfei.cn/)
- 经过测试,`v3.0` 版本中,勾选 `状态码规则` 中的 `使用奇数` 即可
- [手心输入法](https://www.xinshuru.com/)
- 经过测试,`v3.1` 版本中,在 `切换码数字`的输入框中填入 `1` 即可
- 兼容性一般,因为获取到的输入法状态可能有误,导致基于此的相关功能都可能有问题。

#### [应用窗口兼容情况](https://inputtip.pages.dev/FAQ/support-app-list)
Expand Down
37 changes: 30 additions & 7 deletions src/v2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,36 @@
>
> 所有代码完成重构
- 当鼠标悬浮在符号上时,符号立即隐藏
- 此功能在 `2.28.0` 中由于存在问题被移除,现在重新添加
-`设置输入法模式` 中的 `讯飞输入法``手心输入法` 模式合并到 `自定义`
- 现在只有两个模式: `通用``自定义`
-`自定义` 中,添加了 `状态码规则``切换码规则`
- 文本符号中所有配置独立,不再依赖方块符号中的配置
- `2.31.0` 之前的版本,文本符号的透明度、偏移量、边框样式、背景颜色由方块符号中的相同配置决定
- 新增

1. 当鼠标悬浮在符号上时,符号立即隐藏

- 此功能在 `2.28.0` 中由于存在问题被移除,现在重新添加

2.`设置输入法模式``自定义` 中,添加了 `状态码规则``切换码规则``以哪一种状态作为判断依据`

3. 为符号添加了不同状态下符号的独立配置

- 变动

1.`设置输入法模式` 中的 `讯飞输入法``手心输入法` 模式合并到 `自定义`

- 现在只有两种输入法模式: `通用``自定义`

2. 文本符号中所有配置独立,不再依赖方块符号中的配置

- `2.31.0` 之前的版本,文本符号的透明度、偏移量、边框样式、背景颜色由方块符号中的相同配置决定

3. 统一配置项的值的计算,部分之前跟随 `DPI` 缩放的配置项不再跟随 `DPI` 缩放

- 这会导致从版本更改后符号可能会变小,你需要重新调整宽高大小

4. 减少了对 powershell 的依赖
- 现在,如果你不使用以下两个功能,就不会因为 powershell 的任何问题报错
- `启用 JAB/JetBrains IDE 支持`
- `开机自启动` 中的 `任务计划程序`
- 但是这也导致了 `InputTip.exe` 变大了许多,不过也只有大约 6 MB 左右

- 其他的修复和优化

## 2.30.2
Expand Down
Binary file modified src/v2/InputTip.JAB.JetBrains.exe
Binary file not shown.
10 changes: 8 additions & 2 deletions src/v2/InputTip.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ HKEY_startup := "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\Curre
gc := {
init: 0,
timer: 0,
tab: 0,
; 记录所有的窗口 Gui,同一个 Gui 只允许存在一个
w: {
; 开机自启动
Expand Down Expand Up @@ -61,17 +62,22 @@ gc := {
}

if (A_IsCompiled) {
favicon := A_ScriptFullPath
; 生成特殊的快捷方式,它会通过任务计划程序启动
if (!FileExist(fileLnk)) {
FileCreateShortcut("C:\WINDOWS\system32\schtasks.exe", fileLnk, , "/run /tn `"abgox.InputTip.noUAC`"", , A_ScriptFullPath, , , 7)
FileCreateShortcut("C:\WINDOWS\system32\schtasks.exe", fileLnk, , "/run /tn `"abgox.InputTip.noUAC`"", , favicon, , , 7)
}

; 生成任务计划程序
try {
Run('powershell -NoProfile -Command $action = New-ScheduledTaskAction -Execute "`'\"' A_ScriptFullPath '\"`'";$principal = New-ScheduledTaskPrincipal -UserId "' A_UserName '" -LogonType ServiceAccount -RunLevel Highest;$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -DontStopOnIdleEnd -ExecutionTimeLimit 10 -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1);$task = New-ScheduledTask -Action $action -Principal $principal -Settings $settings;Register-ScheduledTask -TaskName "abgox.InputTip.noUAC" -InputObject $task -Force', , "Hide")
powershell := 1
} catch {
powershell := 0
}
} else {
TraySetIcon("InputTipSymbol\default\favicon.png", , 1)
favicon := A_ScriptDir "\img\favicon.ico"
TraySetIcon(favicon, , 1)
}

checkIni() ; 检查配置文件
Expand Down
Binary file added src/v2/InputTipCursor/default/CN/AppStarting.ani
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/Arrow.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/Cross.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/Hand.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/Help.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/IBeam.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/No.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/Pen.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/SizeAll.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/SizeNESW.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/SizeNS.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/SizeNWSE.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/SizeWE.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/UpArrow.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/CN/Wait.ani
Binary file not shown.
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/Arrow.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/Cross.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/Hand.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/Help.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/IBeam.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/No.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/Pen.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/SizeAll.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/SizeNESW.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/SizeNS.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/SizeNWSE.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/SizeWE.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/UpArrow.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/Caps/Wait.ani
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/AppStarting.ani
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/Arrow.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/Cross.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/Hand.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/Help.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/IBeam.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/No.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/Pen.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/SizeAll.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/SizeNESW.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/SizeNS.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/SizeNWSE.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/SizeWE.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/UpArrow.cur
Binary file not shown.
Binary file added src/v2/InputTipCursor/default/EN/wait.ani
Binary file not shown.
15 changes: 8 additions & 7 deletions src/v2/menu/JAB.ahk
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
fn_JAB(item, *) {
global enableJetBrainsSupport := !enableJetBrainsSupport
writeIni("enableJetBrainsSupport", enableJetBrainsSupport)
global enableJABSupport := !enableJABSupport
writeIni("enableJABSupport", enableJABSupport)
A_TrayMenu.ToggleCheck(item)
if (enableJetBrainsSupport) {
FileInstall("InputTip.JAB.JetBrains.exe", "InputTip.JAB.JetBrains.exe", 1)
waitFileInstall("InputTip.JAB.JetBrains.exe", 0)

if (enableJABSupport) {
if (runJAB()) {
return
}
createGui(JABGui).Show()
JABGui(info) {
g := createGuiOpt("InputTip - 启用 JAB/JetBrains IDE 支持")
Expand All @@ -30,7 +30,6 @@ fn_JAB(item, *) {
gc.w.enableJABGui := g
return g
}
runJetBrains()
} else {
if (gc.w.enableJABGui) {
gc.w.enableJABGui.Destroy()
Expand All @@ -42,6 +41,8 @@ fn_JAB(item, *) {
RunWait('taskkill /f /t /im InputTip.JAB.JetBrains.exe', , "Hide")
if (A_IsAdmin) {
Run('schtasks /delete /tn "abgox.InputTip.JAB.JetBrains" /f', , "Hide")
}
if (A_IsCompiled) {
try {
FileDelete("InputTip.JAB.JetBrains.exe")
}
Expand Down
4 changes: 2 additions & 2 deletions src/v2/menu/app-offset.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn_app_offset(*) {
gc.appOffsetGui_LV_rm_title.Text := "特殊偏移量列表 ( " gc.appOffsetGui_LV_rm.GetCount() " 个 )"
writeIni("app_offset", "")
global app_offset := {}
restartJetBrains()
restartJAB()
}

addClickFn(LV, RowNumber, tipList) {
Expand Down Expand Up @@ -144,7 +144,7 @@ fn_app_offset(*) {
_app_offset .= ":" SubStr(_info, 1, StrLen(_info) - 1)
}
writeIni("app_offset", SubStr(_app_offset, 2))
restartJetBrains()
restartJAB()
}

global app_offset
Expand Down
4 changes: 2 additions & 2 deletions src/v2/menu/bw-list.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn_bw_list(*) {
value := item.value - 1
writeIni("useWhiteList", value)
global useWhiteList := value
restartJetBrains()
restartJAB()
}
}
g.AddEdit("xs Disabled", "如果使用「黑」名单,你需要承担未知的可能存在的窗口兼容性代价")
Expand Down Expand Up @@ -90,7 +90,7 @@ fn_bw_list(*) {
fn(value) {
global app_hide_state := ":" value ":"
gc.blackListGui_LV_rm_title.Text := "符号显示黑名单 ( " gc.blackListGui_LV_rm.GetCount() " 个 )"
restartJetBrains()
restartJAB()
}
}
gc.w.bwListGui := g
Expand Down
Loading

0 comments on commit 4d8a7d8

Please sign in to comment.