fix: Stop PTZ movement and browser key handling from fighting (#2674)
- Closes: #2623
This commit is contained in:
@@ -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