diff --git a/client/js/shout.js b/client/js/shout.js index 6b13f280..0ad05c08 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -567,6 +567,17 @@ $(function() { } }); + Mousetrap.bind([ + "command+k", + "ctrl+l", + "ctrl+shift+l" + ], function (e) { + // Only clear the chat if the main input is focused. + if( e.target === input[0] ) { + chat.find(".active .chat .messages").empty(); + } + }); + function complete(word) { var words = commands.slice(); var users = chat.find(".active")