Skip to content

Commit

Permalink
fix(capslockx): misc format
Browse files Browse the repository at this point in the history
misc format
  • Loading branch information
snomiao committed May 24, 2024
1 parent a04a0cf commit 6c9635c
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 53 deletions.
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"recommendations": [
"rafaelcavasani.vscode-autohotkey-plus-slimcode"
"mark-wiemer.vscode-autohotkey-plus-plus"
]
}
}
4 changes: 4 additions & 0 deletions Modules/AccModel/AccModel.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ class AccModel2D
; 简单粗暴倍数降速
v *= Exp(-dt*20)
v -= this._sign(v) * dt
; if (a==0){
; v *= 0.5 ** (dt / (halflife / 1000));
; }

; v *= 1 - this.衰减率
; 线性降速
; v -= !this.衰减率 ? 0 : v > 1 ? 1 : (v < -1 ? -1 : 0)
Expand Down
6 changes: 3 additions & 3 deletions Modules/App-XunFeiSwitching.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## 用法

| 作用于 | 按键 | 功能说明 |
| ------ | :-----: | --------------------- |
| 作用于 | 按键 | 功能说明 |
| ------ | :-----------: | --------------------- |
| 全局 | Win + Alt + H | 启动/切换讯飞语音输入 |

##
Expand All @@ -12,4 +12,4 @@

## 效果如下图

![App-讯飞语音输入法悬浮窗演示.gif](./App-讯飞语音输入法悬浮窗演示.gif)
![App-讯飞语音输入法悬浮窗演示.gif](./App-讯飞语音输入法悬浮窗演示.gif)
28 changes: 14 additions & 14 deletions Modules/CLX-Brainstorm.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ return

#if CapsLockXMode

; Brainstorm
; Brainstorm

b:: brainstorm()
+b:: brainstorm_show()
!b:: brainstorm_set_key()
b:: brainstorm()
+b:: brainstorm_show()
!b:: brainstorm_set_key()

#if brainstorming

esc:: stop_brainstorm()
esc:: stop_brainstorm()

#if

Expand Down Expand Up @@ -72,11 +72,11 @@ brainstorm()
content:=brainstorm_copy()

prompt := ""
prompt .= t("'例1:Translate to english:'") . "`n"
prompt .= t("'例2:解釈这句話:'") . "`n"
prompt .= t("'例3:总结5点:'") . "`n"
prompt .= t("'例1:Translate to english:'") . "`n"
prompt .= t("'例2:解釈这句話:'") . "`n"
prompt .= t("'例3:总结5点:'") . "`n"
prompt .= "--- " . t("以下为提問内容") . " ---`n" . content
InputBox, cmd, % t("请輸入文本指令"), %prompt%, , 500, 600,,,,,% brainstormLastQuestion
InputBox, cmd, % t("请輸入文本指令"), %prompt%, , 500, 600,,,,,% brainstormLastQuestion

; if escape
if (ErrorLevel == 1) {
Expand All @@ -87,6 +87,7 @@ brainstorm()

global brainstorming := true
brainstorm_questionPost(msg)
ToolTip, % t("Asking AI")
}

brainstorm_questionPost(question)
Expand Down Expand Up @@ -118,21 +119,20 @@ BS_questionPost_onReadyStateChange(xhr)
brainstorm_set_key()
}
if (xhr.status == 429) {
MsgBox, % xhr.responseText . " " . t("请等待一段时间后再试")
MsgBox, % xhr.responseText . " " . t("请等待一段时间后再试")
}
MsgBox, % xhr.responseText . " " . t("Unknown Error")
return
}
global questionId := xhr.responseText
if (!questionId) {
MsgBox, t("Fail to ask ai")
MsgBox, % t("Fail to ask ai")
return
}

ToolTip, % t("Asking AI")
ToolTip, % t("Waiting Answer...")
; tooltip askAiSucc with question %questionId%


global brainstormStagedAnswer
brainstormStagedAnswer := ""
tokenAppend(questionId)
Expand Down Expand Up @@ -198,4 +198,4 @@ brainstorm_EncodeDecodeURI(str, encode := true, component := true)
( Doc.documentMode < 9 && JS.execScript() )
}
Return JS[ (encode ? "en" : "de") . "codeURI" . (component ? "Component" : "") ](str)
}
}
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,19 @@ Simplify keyboard operation for OneNote 2016 - 2019, conveniently using keyboard

### Xunfei Input Method Floating Window Plugin

#### Usage
## Usage

| Application | Shortcut | Function Description |
| ----------- | :----------: | ---------------------------- |
| Global | Win + Alt + H | Launch/Switch Xunfei Voice Input |
| Applies to | Key Combination | Function Description |
| ---------- | :----------------------: | --------------------------------- |
| Global | Win + Alt + H | Start/Switch to Xunfei Voice Input |

#### Note
## Note

1. If Xunfei Voice Input is not installed, it will automatically prompt whether to guide the download and installation.
1. If the Xunfei voice is not installed, it will automatically prompt whether to guide the download and installation

#### The effect is as shown in the following figure
## The effect is as shown in the following figure

![App-讯飞语音输入法悬浮窗演示.gif](./docs/media/App-讯飞语音输入法悬浮窗演示.gif)
![App-Xunfei Voice Input Floating Window Demonstration.gif](./docs/media/App-Xunfei Voice Input Floating Window Demonstration.gif)

<!-- MODULE_FILE: CLX-Brainstorm.ahk-->

Expand Down Expand Up @@ -597,12 +597,12 @@ How to help CapsLockX survive? If CapsLockX has been helpful to you:
### Related Topics - Related Topics

- [秦金伟](http://rsytes.coding-pages.com/)
- [2020-02-23 当键盘模拟鼠标 - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247483745&idx=1&sn=16f16c1fa02e1ef386a83f3023fb109d&chksm=e8c54b93dfb2c285e49fa8045d2380b20810768e3be043f364be146a598faf5f363bbb2623e7&scene=21#wechat_redirect )
- [2020-10-26 键盘模拟鼠标2 - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247484272&idx=1&sn=0ed1ff91bee008fc5c01dc0fe20e53ba&chksm=e8c54982dfb2c09493c88a0f7847ffb0b508598e0756ddd7e8ad94d1f31f65490388d6cff7a4&scene=21#wechat_redirect )
- [2020-02-23 当键盘模拟鼠标 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247483745&idx=1&sn=16f16c1fa02e1ef386a83f3023fb109d&chksm=e8c54b93dfb2c285e49fa8045d2380b20810768e3be043f364be146a598faf5f363bbb2623e7&scene=21#wechat_redirect)
- [2020-10-26 键盘模拟鼠标 2 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247484272&idx=1&sn=0ed1ff91bee008fc5c01dc0fe20e53ba&chksm=e8c54982dfb2c09493c88a0f7847ffb0b508598e0756ddd7e8ad94d1f31f65490388d6cff7a4&scene=21#wechat_redirect)
- [2021-03-11 capslockX-治愈鼠标手 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247484478&idx=1&sn=1518d7ec4dc08c1a72c08fcaff98550e&chksm=e8c54eccdfb2c7daed0ad9b8c03395e4211e029199374f4bc0dbdc9a8403c2dae86b740c95c5&scene=21#wechat_redirect)
- 2021年11月,键盘模拟鼠标3
- [2022-08-21 t0820 复制后匹配-siyuan-clx-截图 - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485441&idx=1&sn=848d5e6f3fb7c1e7b14100615ca7d0db&chksm=e8c542f3dfb2cbe5770fe19bb8b5c81935e52a4a686154e69104bc403ab6ce960d1b6ae429a9&scene=21#wechat_redirect )
- [2024-01-06 t0106 OpenAI加持的CapslockX - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485707&idx=1&sn=d40eea9f0b5bb81e3387ec592def4ed0&chksm=e8c543f9dfb2caef90939e2fafcb324fd757949c79399c55adfbab0940e70efd753fb6bf3837&token=1464360155&lang=zh_CN#rd)
- 2021 年 11 月,键盘模拟鼠标 3
- [2022-08-21 t0820 复制后匹配-siyuan-clx-截图 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485441&idx=1&sn=848d5e6f3fb7c1e7b14100615ca7d0db&chksm=e8c542f3dfb2cbe5770fe19bb8b5c81935e52a4a686154e69104bc403ab6ce960d1b6ae429a9&scene=21#wechat_redirect)
- [2024-01-06 t0106 OpenAI 加持的 CapslockX - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485707&idx=1&sn=d40eea9f0b5bb81e3387ec592def4ed0&chksm=e8c543f9dfb2caef90939e2fafcb324fd757949c79399c55adfbab0940e70efd753fb6bf3837&token=1464360155&lang=zh_CN#rd)
- V2EX:
- [有没有办法将 Chrome OS 中的快捷键实现到 Windows 10 中 - V2EX](https://www.v2ex.com/t/778967)
- [推荐一下我的键位映射工具 MyKeymap - V2EX](https://v2ex.com/t/844432)
Expand All @@ -616,12 +616,12 @@ How to help CapsLockX survive? If CapsLockX has been helpful to you:
- [怎么样才能只用键盘不用鼠标,包括任何指针触控设备,并优雅地使用电脑? - 知乎](https://www.zhihu.com/question/21281518/answer/1770669886)
- [如何将电脑桌面划分为独立的两半? - 知乎](https://www.zhihu.com/question/23443944/answer/1670521971)
- [我是职场达人,AutoHotKey 让我成为职场超人 - 知乎](https://zhuanlan.zhihu.com/p/60372361)
- [为什么知乎上这么多人推荐 HHKB,却不反复强调说该键盘不适合大多数程序员? - 知乎]( https://www.zhihu.com/question/33690121/answer/3495460336 )
- [为什么知乎上这么多人推荐 HHKB,却不反复强调说该键盘不适合大多数程序员? - 知乎](https://www.zhihu.com/question/33690121/answer/3495460336)
- AutoAHK:
- [AutoHotKey 中文网专栏 - 知乎](https://www.zhihu.com/column/autoahk)
- [我是职场达人,AutoHotKey让我成为职场超人 – AutoAHK]( https://www.autoahk.com/archives/14636 )
- [脱胎于CapslockX的雪星鼠标-键盘模拟鼠标 – AutoAHK]( https://www.autoahk.com/archives/44126 )
- [QZ——Arrary – AutoAHK]( https://www.autoahk.com/archives/4133 )
- [我是职场达人,AutoHotKey 让我成为职场超人 – AutoAHK](https://www.autoahk.com/archives/14636)
- [脱胎于 CapslockX 的雪星鼠标-键盘模拟鼠标 – AutoAHK](https://www.autoahk.com/archives/44126)
- [QZ——Arrary – AutoAHK](https://www.autoahk.com/archives/4133)
- [CapsLockX - 像黑客一样操作电脑! - AutoHotkey Community](https://www.autohotkey.com/boards/viewtopic.php?f=28&t=88593)
- [(10) What are some good career alternatives for a computer programmer with RSI? - Quora](https://www.quora.com/Repetitive-Strain-Injury-RSI/What-are-some-good-career-alternatives-for-a-computer-programmer-with-RSI)

Expand Down
34 changes: 17 additions & 17 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@ Simplify keyboard operation for OneNote 2016 - 2019, conveniently using keyboard

### Xunfei Input Method Floating Window Plugin

#### Usage
## Usage

| Application | Shortcut | Function Description |
| ----------- | :----------: | ---------------------------- |
| Global | Win + Alt + H | Launch/Switch Xunfei Voice Input |
| Applies to | Key Combination | Function Description |
| ---------- | :----------------------: | --------------------------------- |
| Global | Win + Alt + H | Start/Switch to Xunfei Voice Input |

#### Note
## Note

1. If Xunfei Voice Input is not installed, it will automatically prompt whether to guide the download and installation.
1. If the Xunfei voice is not installed, it will automatically prompt whether to guide the download and installation

#### The effect is as shown in the following figure
## The effect is as shown in the following figure

![App-讯飞语音输入法悬浮窗演示.gif](./media/App-讯飞语音输入法悬浮窗演示.gif)
![App-Xunfei Voice Input Floating Window Demonstration.gif](./media/App-Xunfei Voice Input Floating Window Demonstration.gif)

<!-- MODULE_FILE: CLX-Brainstorm.ahk-->

Expand Down Expand Up @@ -595,12 +595,12 @@ How to help CapsLockX survive? If CapsLockX has been helpful to you:
### Related Topics - Related Topics

- [秦金伟](http://rsytes.coding-pages.com/)
- [2020-02-23 当键盘模拟鼠标 - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247483745&idx=1&sn=16f16c1fa02e1ef386a83f3023fb109d&chksm=e8c54b93dfb2c285e49fa8045d2380b20810768e3be043f364be146a598faf5f363bbb2623e7&scene=21#wechat_redirect )
- [2020-10-26 键盘模拟鼠标2 - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247484272&idx=1&sn=0ed1ff91bee008fc5c01dc0fe20e53ba&chksm=e8c54982dfb2c09493c88a0f7847ffb0b508598e0756ddd7e8ad94d1f31f65490388d6cff7a4&scene=21#wechat_redirect )
- [2020-02-23 当键盘模拟鼠标 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247483745&idx=1&sn=16f16c1fa02e1ef386a83f3023fb109d&chksm=e8c54b93dfb2c285e49fa8045d2380b20810768e3be043f364be146a598faf5f363bbb2623e7&scene=21#wechat_redirect)
- [2020-10-26 键盘模拟鼠标 2 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247484272&idx=1&sn=0ed1ff91bee008fc5c01dc0fe20e53ba&chksm=e8c54982dfb2c09493c88a0f7847ffb0b508598e0756ddd7e8ad94d1f31f65490388d6cff7a4&scene=21#wechat_redirect)
- [2021-03-11 capslockX-治愈鼠标手 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247484478&idx=1&sn=1518d7ec4dc08c1a72c08fcaff98550e&chksm=e8c54eccdfb2c7daed0ad9b8c03395e4211e029199374f4bc0dbdc9a8403c2dae86b740c95c5&scene=21#wechat_redirect)
- 2021年11月,键盘模拟鼠标3
- [2022-08-21 t0820 复制后匹配-siyuan-clx-截图 - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485441&idx=1&sn=848d5e6f3fb7c1e7b14100615ca7d0db&chksm=e8c542f3dfb2cbe5770fe19bb8b5c81935e52a4a686154e69104bc403ab6ce960d1b6ae429a9&scene=21#wechat_redirect )
- [2024-01-06 t0106 OpenAI加持的CapslockX - qwertc]( https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485707&idx=1&sn=d40eea9f0b5bb81e3387ec592def4ed0&chksm=e8c543f9dfb2caef90939e2fafcb324fd757949c79399c55adfbab0940e70efd753fb6bf3837&token=1464360155&lang=zh_CN#rd)
- 2021 年 11 月,键盘模拟鼠标 3
- [2022-08-21 t0820 复制后匹配-siyuan-clx-截图 - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485441&idx=1&sn=848d5e6f3fb7c1e7b14100615ca7d0db&chksm=e8c542f3dfb2cbe5770fe19bb8b5c81935e52a4a686154e69104bc403ab6ce960d1b6ae429a9&scene=21#wechat_redirect)
- [2024-01-06 t0106 OpenAI 加持的 CapslockX - qwertc](https://mp.weixin.qq.com/s?__biz=MzIzNzczOTkzMw==&mid=2247485707&idx=1&sn=d40eea9f0b5bb81e3387ec592def4ed0&chksm=e8c543f9dfb2caef90939e2fafcb324fd757949c79399c55adfbab0940e70efd753fb6bf3837&token=1464360155&lang=zh_CN#rd)
- V2EX:
- [有没有办法将 Chrome OS 中的快捷键实现到 Windows 10 中 - V2EX](https://www.v2ex.com/t/778967)
- [推荐一下我的键位映射工具 MyKeymap - V2EX](https://v2ex.com/t/844432)
Expand All @@ -614,12 +614,12 @@ How to help CapsLockX survive? If CapsLockX has been helpful to you:
- [怎么样才能只用键盘不用鼠标,包括任何指针触控设备,并优雅地使用电脑? - 知乎](https://www.zhihu.com/question/21281518/answer/1770669886)
- [如何将电脑桌面划分为独立的两半? - 知乎](https://www.zhihu.com/question/23443944/answer/1670521971)
- [我是职场达人,AutoHotKey 让我成为职场超人 - 知乎](https://zhuanlan.zhihu.com/p/60372361)
- [为什么知乎上这么多人推荐 HHKB,却不反复强调说该键盘不适合大多数程序员? - 知乎]( https://www.zhihu.com/question/33690121/answer/3495460336 )
- [为什么知乎上这么多人推荐 HHKB,却不反复强调说该键盘不适合大多数程序员? - 知乎](https://www.zhihu.com/question/33690121/answer/3495460336)
- AutoAHK:
- [AutoHotKey 中文网专栏 - 知乎](https://www.zhihu.com/column/autoahk)
- [我是职场达人,AutoHotKey让我成为职场超人 – AutoAHK]( https://www.autoahk.com/archives/14636 )
- [脱胎于CapslockX的雪星鼠标-键盘模拟鼠标 – AutoAHK]( https://www.autoahk.com/archives/44126 )
- [QZ——Arrary – AutoAHK]( https://www.autoahk.com/archives/4133 )
- [我是职场达人,AutoHotKey 让我成为职场超人 – AutoAHK](https://www.autoahk.com/archives/14636)
- [脱胎于 CapslockX 的雪星鼠标-键盘模拟鼠标 – AutoAHK](https://www.autoahk.com/archives/44126)
- [QZ——Arrary – AutoAHK](https://www.autoahk.com/archives/4133)
- [CapsLockX - 像黑客一样操作电脑! - AutoHotkey Community](https://www.autohotkey.com/boards/viewtopic.php?f=28&t=88593)
- [(10) What are some good career alternatives for a computer programmer with RSI? - Quora](https://www.quora.com/Repetitive-Strain-Injury-RSI/What-are-some-good-career-alternatives-for-a-computer-programmer-with-RSI)

Expand Down

0 comments on commit 6c9635c

Please sign in to comment.