mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
support zimnego startu lokomotyw
This commit is contained in:
@@ -49,12 +49,10 @@ const sectionKeyIndexes: { [key: number]: SectionMode } = {
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
console.log(sectionButtonRefs.value);
|
||||
|
||||
window.addEventListener('keydown', (e) => {
|
||||
if (e.target instanceof HTMLInputElement) return;
|
||||
|
||||
if (e.key == '1' || e.key == '2' || e.key == '3' || e.key == '4') {
|
||||
if (/[1234]/.test(e.key)) {
|
||||
const keyNum = Number(e.key);
|
||||
store.stockSectionMode = sectionKeyIndexes[keyNum];
|
||||
(sectionButtonRefs.value[keyNum - 1] as HTMLButtonElement).focus();
|
||||
|
||||
Reference in New Issue
Block a user