mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-12 02:01:31 -04:00
chat: Move Alt-C handling to chat.js
This commit is contained in:
parent
92cd1feb8a
commit
870191f622
3 changed files with 16 additions and 9 deletions
|
@ -296,3 +296,13 @@ exports.chat = (() => {
|
|||
},
|
||||
};
|
||||
})();
|
||||
|
||||
exports.aceKeyEvent = (hookName, {evt}) => {
|
||||
const {altC} = window.clientVars.padShortcutEnabled;
|
||||
if (evt.type !== 'keydown' || !evt.altKey || evt.keyCode !== 67 || !altC) return;
|
||||
evt.target.blur();
|
||||
exports.chat.show();
|
||||
exports.chat.focus();
|
||||
evt.preventDefault();
|
||||
return true;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue