Merge pull request #13485 from MrPetovan/bug/macos-keyboard-shortcuts

Allow macOS users to use Ctrl + Cmd + Space to bring up the emoji picker in Friendica text fields
This commit is contained in:
Michael Vogel 2023-10-02 05:29:58 +02:00 committed by GitHub
commit 22e960d8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -378,16 +378,10 @@ $(function() {
// Allow folks to stop the ajax page updates with the pause/break key
$(document).keydown(function(event) {
if (event.keyCode == '8') {
var target = event.target || event.srcElement;
if (!/input|textarea/i.test(target.nodeName)) {
return false;
}
}
if (event.keyCode == '19' || (event.ctrlKey && event.which == '32')) {
// Pause/Break or Ctrl + Space
if (event.which === 19 || (!event.shiftKey && !event.altKey && event.ctrlKey && event.which === 32)) {
event.preventDefault();
if (stopped == false) {
if (stopped === false) {
stopped = true;
if (event.ctrlKey) {
totStopped = true;