diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-09-24 20:57:32 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-09-24 20:57:32 +0900 |
| commit | e6cc937ac26cd3fe0042b3068d3898b30110136f (patch) | |
| tree | 816e3aa1a96698ce550f08a77617b6bf1fd17aeb /src/client/app/common | |
| parent | 8.61.0 (diff) | |
| download | misskey-e6cc937ac26cd3fe0042b3068d3898b30110136f.tar.gz misskey-e6cc937ac26cd3fe0042b3068d3898b30110136f.tar.bz2 misskey-e6cc937ac26cd3fe0042b3068d3898b30110136f.zip | |
Check meta key
Diffstat (limited to 'src/client/app/common')
| -rw-r--r-- | src/client/app/common/hotkey.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/app/common/hotkey.ts b/src/client/app/common/hotkey.ts index e63fcc9f97..dc1a34338a 100644 --- a/src/client/app/common/hotkey.ts +++ b/src/client/app/common/hotkey.ts @@ -59,7 +59,7 @@ export default { el.dataset.reservedKeys = reservedKeys.map(key => `'${key}'`).join(' '); - el._keyHandler = e => { + el._keyHandler = (e: KeyboardEvent) => { const key = e.code.toLowerCase(); const targetReservedKeys = document.activeElement ? ((document.activeElement as any).dataset || {}).reservedKeys || '' : ''; @@ -72,7 +72,8 @@ export default { const matched = pattern.which.includes(key) && pattern.ctrl == e.ctrlKey && pattern.shift == e.shiftKey && - pattern.alt == e.altKey; + pattern.alt == e.altKey && + e.metaKey == false; if (matched) { e.preventDefault(); |