1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-20 06:59:34 +05:30

(refactor): improved keyboard shotcut keyevent detection

This commit is contained in:
2024-09-27 14:21:05 +05:30
parent 93d88a69e0
commit 80a3511bcb
2 changed files with 9 additions and 9 deletions

View File

@@ -123,7 +123,7 @@ mobileSearchBtn.addEventListener("click", function () {
// when ALT + K shortcut key is pressed
document.addEventListener("keydown", function(event) {
if (event.altKey && event.key === "k") {
if ((event.altKey && event.key === "k") || (event.altKey && event.key === "K")) {
if(!isShareActive) {
activate_search();
}
@@ -442,7 +442,7 @@ mobileShareCloseBtn.addEventListener("click", function () {
// when ALT + L shortcut key is pressed
document.addEventListener("keydown", function(event) {
if (event.altKey && event.key === "l") {
if ((event.altKey && event.key === "l") || (event.altKey && event.key === "L")) {
if(!isSearchActive) {
activate_share();
}