Skip to content

Commit

Permalink
Add Meta K
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikko Miu committed Feb 13, 2024
1 parent 8beeba8 commit f65d338
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion assets/css/pagefind.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ body {

#site-search input:focus {
outline: none;
border-color: hsl(299, 82%, 30%);
border-color: #ee72f1;
background: #111;
}

#site-search input::placeholder {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Turbo from "@hotwired/turbo";
import "@hotwired/turbo";
import katexAutoRender from "katex/contrib/auto-render";

import "./menu";
Expand Down
2 changes: 1 addition & 1 deletion assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const pagefindUIID = "pagefind-ui-script";
const searchSelector = "#site-search";

function toggleSearch(e) {
if (e.ctrlKey && e.keyCode === "K".charCodeAt(0)) {
if ((e.ctrlKey || e.metaKey) && e.keyCode === "K".charCodeAt(0)) {
e.preventDefault();

const searchElement = document.querySelector(
Expand Down

0 comments on commit f65d338

Please sign in to comment.