2024-04-30 08:04:16 +02:00
|
|
|
export class UI {
|
|
|
|
constructor() {
|
|
|
|
document.addEventListener('keydown', evt=>this.keyHandler(evt))
|
2024-05-25 15:00:01 +02:00
|
|
|
document.querySelector('input[name="group"]').focus()
|
2024-04-30 08:04:16 +02:00
|
|
|
}
|
|
|
|
keyHandler(evt) {
|
|
|
|
if (!(evt.altKey && evt.shiftKey))
|
|
|
|
return
|
|
|
|
|
|
|
|
evt.preventDefault()
|
|
|
|
evt.stopPropagation()
|
|
|
|
|
|
|
|
switch (evt.key) {
|
|
|
|
case 'S':
|
|
|
|
document.getElementById('form-trigger').submit()
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|