feat: Rewrite keyboardEventListener mixin to a composable (#9831)

This commit is contained in:
Sivin Varghese
2024-08-05 18:59:47 +05:30
committed by GitHub
parent b4b308336f
commit e0b67bb552
9 changed files with 474 additions and 120 deletions

View File

@@ -22,6 +22,14 @@ export const hasPressedCommandAndEnter = e => {
return hasPressedCommand(e) && isEnter(e);
};
// If layout is QWERTZ then we add the Shift+keysToModify to fix an known issue
// https://github.com/chatwoot/chatwoot/issues/9492
export const keysToModifyInQWERTZ = new Set(['Alt+KeyP', 'Alt+KeyL']);
export const LAYOUT_QWERTY = 'QWERTY';
export const LAYOUT_QWERTZ = 'QWERTZ';
export const LAYOUT_AZERTY = 'AZERTY';
/**
* Determines whether the active element is typeable.
*