Skip to content

Commit

Permalink
Fix: Make plugin less greedy about which keys will activate search to…
Browse files Browse the repository at this point in the history
… allow compatibility with hot keys
  • Loading branch information
andrewmcgivery committed Mar 26, 2024
1 parent 88d181a commit 8b796a6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions React/Components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ const App = ({
style={{
backgroundImage: `url("${background}")`,
}}
onKeyDown={() => {
plugin.openSwitcherCommand(
settings.inlineSearchProvider.command
);
onKeyDown={(e) => {
if (!e.ctrlKey && !e.altKey && /^[A-Za-z0-9]$/.test(e.key)) {
plugin.openSwitcherCommand(
settings.inlineSearchProvider.command
);
}
}}
tabIndex={0} // Make the div focusable so we can capture key strokes
ref={mainDivRef}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "beautitab",
"name": "Beautitab",
"version": "1.6.0",
"version": "1.6.1",
"minAppVersion": "0.15.0",
"description": "Creates a customizable new tab view with beautiful backgrounds, quotes, search, and more.",
"author": "Andrew McGivery",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-beautitab",
"version": "1.6.0",
"version": "1.6.1",
"description": "A plugin for Obsidian.MD that creates a customizable new tab view with beautiful backgrounds, quotes, search, and more.",
"main": "dist/main.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"1.5.0": "0.15.0",
"1.6.0-beta.1": "0.15.0",
"1.6.0-beta.2": "0.15.0",
"1.6.0": "0.15.0"
"1.6.0": "0.15.0",
"1.6.1": "0.15.0"
}

0 comments on commit 8b796a6

Please sign in to comment.