Changing Search Key to not conflict with browsers
This commit is contained in:
@@ -7,15 +7,7 @@
|
|||||||
<i class="fa-solid fa-magnifying-glass" style="margin-left: 3px; margin-right: 6px;"></i> Search...
|
<i class="fa-solid fa-magnifying-glass" style="margin-left: 3px; margin-right: 6px;"></i> Search...
|
||||||
</div>
|
</div>
|
||||||
<div class="searchHotkey">
|
<div class="searchHotkey">
|
||||||
@if (IsMac)
|
<span>/</span>
|
||||||
{
|
|
||||||
<span><i class="fa-solid fa-command"></i>K</span>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<span>CTRL + K</span>
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -51,8 +43,6 @@
|
|||||||
|
|
||||||
private string _userAgent = "";
|
private string _userAgent = "";
|
||||||
|
|
||||||
bool IsMac => _userAgent.Contains("Mac OS");
|
|
||||||
|
|
||||||
private void ButtonClicked(EventArgs eventArgs)
|
private void ButtonClicked(EventArgs eventArgs)
|
||||||
{
|
{
|
||||||
SearchService.Show();
|
SearchService.Show();
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
[JSInvokable("OnKeyPress")]
|
[JSInvokable("OnKeyPress")]
|
||||||
public async Task OnKeyPress(string code, bool ctrlKey, bool shiftKey, bool altKey, bool metaKey)
|
public async Task OnKeyPress(string code, bool ctrlKey, bool shiftKey, bool altKey, bool metaKey)
|
||||||
{
|
{
|
||||||
if (code.ToLower().Equals("k") && (ctrlKey || shiftKey || altKey || metaKey))
|
if (code.ToLower().Equals("/"))
|
||||||
{
|
{
|
||||||
if (searchService.IsVisible)
|
if (searchService.IsVisible)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user