fix: Stop PTZ movement and browser key handling from fighting (#2674)
- Closes: #2623
This commit is contained in:
1 parent
a8aa9ec7c2
commit
3808a1b030
20 files changed
+822
-148
No files matched your search
@@ -4,6 +4,9 @@ import type { TriggerOfType } from './types';
|
||||
|
||||
export class KeyTrigger extends ConditionStateTriggerBase<TriggerOfType<'key'>> {
|
||||
protected _getValue(state: ConditionState): unknown {
|
||||
return state.keys;
|
||||
const key = this._trigger.key;
|
||||
|
||||
// Without a key the trigger is the any-change form, and watches every key.
|
||||
return key === undefined ? state.keys : state.keys?.[key];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user