forked from Blendman974/faceclaw
Glanceboard tap setting includes a Disable option
This commit is contained in:
1 parent
937c73d81b
commit
2971999467
5 files changed
+31
-10
No files matched your search
@@ -68,13 +68,15 @@ export class GlanceHost {
|
||||
/**
|
||||
* The glance event a sleep-time gesture means under the board's settings,
|
||||
* or null when the shell should see the input as usual: nothing while the
|
||||
* board is disabled, no hold when "Show on long press" is off, no press
|
||||
* from a head-tilt when "Show on head tilt" is off (it then wakes the
|
||||
* regular UI). A release always passes so a hold in progress can end.
|
||||
* board is disabled, no press from a tap when "Show on tap" is disabled,
|
||||
* no hold when "Show on long press" is off, no press from a head-tilt when
|
||||
* "Show on head tilt" is off (it then wakes the regular UI). A release
|
||||
* always passes so a hold in progress can end.
|
||||
*/
|
||||
eventForGesture(gesture: "head-tilt" | string): GlanceEvent | null {
|
||||
const provider = this.options.getProvider();
|
||||
if (!provider?.isEnabled()) return null;
|
||||
if (gesture === "click" && !provider.showOnTap()) return null;
|
||||
if (gesture === "long-press" && !provider.showOnLongPress()) return null;
|
||||
if (gesture === "head-tilt" && !provider.showOnHeadTilt()) return null;
|
||||
return glanceEventForGesture(gesture, this.isVisible());
|
||||
|
||||
Reference in new issue
Block a user