+
+
diff --git a/src/components/profile/section.sass b/src/components/profile/section.sass
index ec5313f..001e903 100644
--- a/src/components/profile/section.sass
+++ b/src/components/profile/section.sass
@@ -13,6 +13,11 @@
.subtitle
margin-bottom: 5px
font-size: 14px
+ .help-icon
+ font-size: 14px
+ vertical-align: middle
+ color: hsl(0deg, 0%, 40%)
+ cursor: pointer
p
font-size: 14px
@@ -262,3 +267,50 @@
button
text-align: center
+// Gyro momentum settings
+.gyro-momentum
+ margin-top: 10px
+
+ .setting
+ display: flex
+ align-items: center
+ margin-bottom: 15px
+ .text
+ display: flex
+ flex: 1
+ min-width: 0
+ height: 40px
+ margin-right: 10px
+ align-items: center
+ background-color: hsl(0deg, 0%, 20%)
+ border-radius: 5px
+ .name
+ font-size: 14px
+ font-weight: normal
+ white-space: nowrap
+ .material
+ font-size: 18px
+ color: hsl(0deg, 0%, 40%)
+ padding-left: 6px
+ padding-right: 4px
+ cursor: pointer
+ line-height: 40px
+
+ ::ng-deep app-input-number
+ width: 100px
+ height: 40px !important
+ & *
+ height: 40px !important
+ line-height: 40px !important
+ .number
+ border-radius: 5px
+ background-color: black
+ .value, .unit
+ font-size: 16px !important
+ font-weight: normal !important
+ color: white !important
+ .button
+ color: hsl(0deg, 0%, 40%) !important
+
+ ::ng-deep app-input-toggle
+ height: 40px !important
diff --git a/src/components/profile/section.ts b/src/components/profile/section.ts
index 5172f50..243b665 100644
--- a/src/components/profile/section.ts
+++ b/src/components/profile/section.ts
@@ -6,6 +6,7 @@ import { CommonModule } from '@angular/common'
import { FormsModule } from '@angular/forms'
import { ActionSelectorComponent } from './action_selector'
import { InputNumberComponent } from 'components/input_number/input_number'
+import { InputToggleComponent } from 'components/input_toggle/input_toggle'
import { WebusbService } from 'services/webusb'
import { Profile } from 'lib/profile'
import { CtrlSection, CtrlSectionMeta, CtrlButton, CtrlRotary } from 'lib/ctrl'
@@ -24,6 +25,7 @@ import { delay } from 'lib/delay'
CommonModule,
FormsModule,
InputNumberComponent,
+ InputToggleComponent,
ActionSelectorComponent,
],
templateUrl: './section.html',
@@ -41,6 +43,10 @@ export class SectionComponent {
pickerTune = 0
profileOverwriteIndex = 0
profiles = this.webusb.getProfiles()!
+ // Help dialog
+ dialogHelp: any
+ helpTitle = ''
+ helpText = ''
// Template aliases.
HID = HID
SectionIndex = SectionIndex
@@ -303,6 +309,45 @@ export class SectionComponent {
save = async () => {
await this.webusb.trySetSection(this.profileIndex, this.section)
}
+
+ showDialogHelp(key: string) {
+ const titles: {[key: string]: string} = {
+ gyroMomentum: "Enable Momentum",
+ gyroMomentumDamping: "Momentum Dampening",
+ gyroMomentumCutoff: "Momentum Cutoff Velocity",
+ }
+ const texts: {[key: string]: string} = {
+ gyroMomentum:
+ `When enabled, the mouse cursor will have "momementum" and continue moving after
+ disabling the gyro for a short time. The cursor will have the initial velocity at
+ the moment of disabling, and then it will slow down at an exponential rate.
+ This creates a more fluid, natural feel similar to trackpad or trackball momentum.
+
+ Works in both TOUCH_ON mode (momentum continues after releasing the button) and TOUCH_OFF
+ mode (momentum continues after pressing the button to stop gyro input).`,
+ gyroMomentumDamping:
+ `Controls how quickly the momentum decays. Consider these values "friction" values.
+ with Higher values = faster decay.
+ Separate values for vertical and horizontal allow you to customize the feel for each axis.
+ For example, you might want faster horizontal swipes but more controlled vertical movement.
+ Recommended range: 1.0-20.0. Default: H=4.0, V=4.0`,
+ gyroMomentumCutoff:
+ `The minimum velocity (in pixels per second) below which momentum stops completely. At 250Hz,
+ The minimum visible velocity is about 250 pixels/second, but the cutoff can be set even lower.
+ This prevents the cursor from drifting indefinitely at very slow speeds.
+ Lower values = momentum lasts longer but may feel floaty
+ Higher values = momentum stops sooner but may feel abrupt