Skip to content

Commit

Permalink
perf: 🚀 Add mouse binding options
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Jul 4, 2024
1 parent 87fe331 commit 7ee4ba4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@
"${item.decoder} & ${item.encoder}",
" & ",
"${key}=${value}"
],
"cSpell.words": [
"bhsn"
]
}
2 changes: 1 addition & 1 deletion src/components/Preference/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<div class="flex items-center">
<el-tooltip
v-if="item_1.tips"
class=""
popper-class="max-w-96"
effect="dark"
:content="$t(item_1.tips)"
placement="bottom"
Expand Down
3 changes: 3 additions & 0 deletions src/locales/languages/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@
"preferences.input.mouse.options[1].placeholder": "Simulates a physical HID mouse using the UHID kernel module on the device",
"preferences.input.mouse.options[2].placeholder": "Simulates a physical HID mouse using the AOAv2 protocol",
"preferences.input.mouse.options[3].placeholder": "Disable mouse input",
"preferences.input.mouse-bind.name": "Mouse Bind",
"preferences.input.mouse-bind.tips": "Mouse button bindings can be configured using the \"xxxx\" parameter, where each \"x\" represents a button (right click, middle click, 4th click, 5th click), and can be set to forward (+), ignore (-), back (b), home (h), app switch (s), or expand notification panel (n).",
"preferences.input.mouse-bind.placeholder": "bhsn",
"preferences.input.keyboard.name": "Keyboard Mode",
"preferences.input.keyboard.placeholder": "sdk",
"preferences.input.keyboard.tips": "Set keyboard input mode",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/languages/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@
"preferences.input.mouse.options[1].placeholder": "使用设备上的 UHID 内核模块模拟物理 HID 鼠标",
"preferences.input.mouse.options[2].placeholder": "使用 AOAv2 协议模拟物理 HID 鼠标",
"preferences.input.mouse.options[3].placeholder": "禁用鼠标输入",
"preferences.input.mouse-bind.name": "鼠标绑定",
"preferences.input.mouse-bind.tips": "鼠标按键绑定可通过 “xxxx” 参数配置,其中每个 “x” 代表一个按键(右键、中键、第4键、第5键),可设置为转发(+)、忽略(-)、返回(b)、主页(h)、切换应用(s)、展开通知栏(n)。",
"preferences.input.mouse-bind.placeholder": "bhsn",
"preferences.input.keyboard.name": "键盘模式",
"preferences.input.keyboard.tips": "设置键盘输入模式",
"preferences.input.keyboard.placeholder": "sdk",
Expand Down
3 changes: 3 additions & 0 deletions src/locales/languages/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@
"preferences.input.mouse.options[1].placeholder": "使用裝置上的 UHID 核心模組模擬物理 HID 滑鼠",
"preferences.input.mouse.options[2].placeholder": "使用 AOAv2 協議模擬物理 HID 滑鼠",
"preferences.input.mouse.options[3].placeholder": "停用滑鼠輸入",
"preferences.input.mouse-bind.name": "滑鼠綁定",
"preferences.input.mouse-bind.tips": "滑鼠按鍵綁定可透過「xxxx」 參數配置,其中每個「x」 代表一個按鍵(右鍵、中鍵、第4鍵、第5鍵),可設定為轉送(+)、忽略(-)、返回(b)、主頁(h)、切換應用程式(s)、展開通知欄(n)。",
"preferences.input.mouse-bind.placeholder": "bhsn",
"preferences.input.keyboard.name": "鍵盤模式",
"preferences.input.keyboard.tips": "設定鍵盤輸入模式",
"preferences.input.keyboard.placeholder": "sdk",
Expand Down
8 changes: 8 additions & 0 deletions src/store/preference/model/input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ export default {
},
],
},
mouseBind: {
field: '--mouse-bind',
type: 'Input',
label: 'preferences.input.mouse-bind.name',
placeholder: 'preferences.input.mouse-bind.placeholder',
tips: 'preferences.input.mouse-bind.tips',
value: void 0,
},
keyboard: {
label: 'preferences.input.keyboard.name',
field: '--keyboard',
Expand Down

0 comments on commit 7ee4ba4

Please sign in to comment.