Skip to content

Commit

Permalink
add Ctrl+Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
takayama-lily committed Mar 26, 2021
1 parent f53b5db commit 96b6ab2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 6 additions & 0 deletions assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,4 +331,10 @@ $(document).ready(function () {
$("body").on("mouseleave", ".chat-img", function() {
$("#img-preview").hide();
});

$(window).keydown(function (event) {
if (event.ctrlKey && event.keyCode === 13) {
sendMsg();
}
});
});
9 changes: 4 additions & 5 deletions assets/chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
left: 0;
}
button#send {
position: fixed;
bottom: 0;
left: 0;
margin: 10px;
}
#to-bottom {
Expand Down Expand Up @@ -65,8 +62,10 @@
<img id="img-preview" style="z-index: 999;">

<textarea id="content" rows="10" placeholder="在此输入消息..."></textarea>
<div id="footer" class="vscode-dark"></div>
<button id="send" onclick="sendMsg()">发送</button>
<div id="footer" class="vscode-dark">
<button id="send" onclick="sendMsg()">发送</button>Ctrl+Enter 
(发文字以外内容暂时只能手写<a href="https://github.com/takayama-lily/oicq/wiki/90.%E5%A6%82%E4%BD%95%E5%8F%91%E9%80%81%E5%A4%9A%E5%AA%92%E4%BD%93%E5%86%85%E5%AE%B9(CQ%E7%A0%81)" target="_blank">CQ码</a>)
</div>
<span id="to-bottom" onclick="$(document).scrollTop($(document).height());">↓底部</span>
</body>

Expand Down

0 comments on commit 96b6ab2

Please sign in to comment.