Fix keystroke selection when additional field is given but no scancode (#306)
This commit is contained in:
committed by
László Monda
parent
e2fef4fb3e
commit
a8a659dadd
@@ -212,12 +212,14 @@ export class KeypressTabComponent extends Tab implements OnChanges {
|
|||||||
let scanCode: number;
|
let scanCode: number;
|
||||||
let type: string;
|
let type: string;
|
||||||
if (option.additional) {
|
if (option.additional) {
|
||||||
scanCode = option.additional.scancode ? option.additional.scancode : 0;
|
scanCode = option.additional.scancode;
|
||||||
type = option.additional.type || 'basic';
|
type = option.additional.type || 'basic';
|
||||||
} else {
|
} else {
|
||||||
scanCode = +option.id;
|
|
||||||
type = 'basic';
|
type = 'basic';
|
||||||
}
|
}
|
||||||
|
if (scanCode === undefined) {
|
||||||
|
scanCode = +option.id;
|
||||||
|
}
|
||||||
|
|
||||||
return [scanCode, type];
|
return [scanCode, type];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user