-
-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(keyboardShortcut): cleanup & patch keybinds #2506
Conversation
It takes a noticeable amount of time (seconds) to add/remove hundreds of elements directly to/from the DOM. All element.remove() and element.append() should happen only after vimOverlay is removed, and when all the changes to its descendants are made, we then can add it back to the DOM. With this, the whole operation becomes quasi-instant. |
i haven't modified this behavior nor do I plan to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! Just want to check the missing shortcuts
hey im looking to implement this in my new pr #2860, its my understanding that you mean instead of keeping the vimOverlay in dom and appending / removing hundreds of keys, we instead append all these children before appending to document if that makes sense? |
This PR removes redundant keybinds that Spotify have implemented into their own shortcut menu (ctrl + ?), whilst also fixing pre-existing ones (namely rotate navbar item which broke from libx).
The registering of these binds has also been moved to a json/object structure making it easier to expand upon both on the dev side and in a future settings menu if we were to add one.
Also moved from
Spicetify.Keyboard
toSpicetify.Mousetrap
(docs will need rewriting)