Мелкий рефакторинг
This commit is contained in:
@@ -206,7 +206,9 @@ export function escapeXml(str) {
|
|||||||
|
|
||||||
export function keyEventToCode(event) {
|
export function keyEventToCode(event) {
|
||||||
let result = [];
|
let result = [];
|
||||||
const modCode = event.code.substring(0, 3);
|
let code = event.code;
|
||||||
|
|
||||||
|
const modCode = code.substring(0, 3);
|
||||||
if (event.metaKey && modCode != 'Met')
|
if (event.metaKey && modCode != 'Met')
|
||||||
result.push('Meta');
|
result.push('Meta');
|
||||||
if (event.ctrlKey && modCode != 'Con')
|
if (event.ctrlKey && modCode != 'Con')
|
||||||
@@ -216,7 +218,6 @@ export function keyEventToCode(event) {
|
|||||||
if (event.altKey && modCode != 'Alt')
|
if (event.altKey && modCode != 'Alt')
|
||||||
result.push('Alt');
|
result.push('Alt');
|
||||||
|
|
||||||
let code = event.code;
|
|
||||||
if (modCode == 'Dig') {
|
if (modCode == 'Dig') {
|
||||||
code = code.substring(5, 6);
|
code = code.substring(5, 6);
|
||||||
} else if (modCode == 'Key') {
|
} else if (modCode == 'Key') {
|
||||||
|
|||||||
Reference in New Issue
Block a user