Respect settings target and allow command override

This commit is contained in:
Michael Shamoon 2022-10-19 23:07:01 -07:00
parent 5abe13c726
commit f62021633b
2 changed files with 12 additions and 8 deletions

View file

@ -197,7 +197,7 @@ function Home({ initialSettings }) {
useEffect(() => {
function handleKeyDown(e) {
if (e.target.tagName === "BODY") {
if (String.fromCharCode(e.keyCode).match(/(\w|\s)/g) && !(e. altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
if (String.fromCharCode(e.keyCode).match(/(\w|\s)/g) && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
setSearching(true);
} else if (e.key === "Escape") {
setSearchString("");