If you’re a reasonable human then you can inspect the keyCodes attribute of the parameter that gets passed into the callback:
var combo = this.input.keyboard.createCombo('ABC', { resetOnMatch: true });
var combo2 = this.input.keyboard.createCombo('AAA', { resetOnMatch: true });
this.input.keyboard.on('keycombomatch', function (event) {
console.log('Key Combo matched!' + event.keyCodes.join(', '));
});
This will print the (numeric) keys that were pressed to trigger the combo.
If you’re an absurd human you’ll spend a month writing a library to handle arbitrary combo matching which will emit the named combo when it gets matched.
var combo = this.input.keyboard.createCombo('ABC', { resetOnMatch: true });
var combo2 = this.input.keyboard.createCombo('AAA', { resetOnMatch: true });
this.input.keyboard.on('keycombomatch', function (event, keyEvent) {
console.log(keyEvent.code); /// KeyA , the last key that is pressed in the key combo.
});
since I’m only doing double taps for now, it’ll fine.