Fixed OSX shortcut
This commit is contained in:
@@ -96,9 +96,9 @@ The most important settings are stored in `custom_nodes/ComfyUI-N-Sidebar/settin
|
||||
|
||||
# Keyboard Shortcuts
|
||||
|
||||
- `Alt+Z` to toggle show/hide sidebar
|
||||
- `Alt+X` to focus on the search field
|
||||
- `Alt+G` to open the settings
|
||||
- `Alt+Z` or `Option+Z` to toggle show/hide sidebar
|
||||
- `Alt+X` or `Option+X` to focus on the search field
|
||||
- `Alt+G` or `Option+G` to open the settings
|
||||
|
||||
# Features
|
||||
|
||||
|
||||
+11
-10
@@ -966,24 +966,25 @@ function toggleSHSB(force = undefined) {
|
||||
|
||||
function handleKeyPress(event) {
|
||||
|
||||
if (event.altKey && event.key.toLowerCase() === "x") {
|
||||
//toggle sidebar if it's closed
|
||||
// Per la combinazione Alt + X
|
||||
if (event.altKey && (event.key.toLowerCase() === "x" || event.keyCode === 88)) {
|
||||
// Toggle sidebar if it's closed
|
||||
const side_bar = document.getElementById('content_sidebar_home');
|
||||
if (side_bar.classList.contains('closed')) {
|
||||
toggleSHSB();
|
||||
|
||||
}
|
||||
//focus on searchInput
|
||||
// Focus on searchInput
|
||||
searchInput.focus();
|
||||
}
|
||||
|
||||
|
||||
// Per la combinazione Alt + Z
|
||||
if (event.altKey && (event.key.toLowerCase() === "z" || event.keyCode === 90)) {
|
||||
toggleSHSB();
|
||||
}
|
||||
if (event.altKey && event.key.toLowerCase() === "z") {
|
||||
toggleSHSB()
|
||||
}
|
||||
if (event.altKey && event.key.toLowerCase() === "g") {
|
||||
showSettings()
|
||||
if (event.altKey && (event.key.toLowerCase() === "g" || event.keyCode === 71)) {
|
||||
showSettings();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-n-sidebar"
|
||||
description = "A simple sidebar for ComfyUI."
|
||||
version = "1.2.2"
|
||||
version = "1.2.3"
|
||||
license = "LICENSE"
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user