We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e0146f commit 5ed2d70Copy full SHA for 5ed2d70
extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js
@@ -966,3 +966,26 @@ onUiLoaded(async() => {
966
// Add integration with Inpaint Anything
967
// applyZoomAndPanIntegration("None", ["#ia_sam_image", "#ia_sel_mask"]);
968
});
969
+
970
971
+onUiLoaded(function(){
972
+ let isAltPressed = false;
973
974
+ function handleAltKeyDown(e) {
975
+ if (e.code === "AltLeft" || e.code === "AltRight") {
976
+ isAltPressed = true;
977
+ } else {
978
+ isAltPressed = false;
979
+ }
980
981
982
+ function handleAltKeyUp(e) {
983
+ if (isAltPressed) {
984
+ e.preventDefault();
985
986
987
988
989
+ document.addEventListener("keydown", handleAltKeyDown);
990
+ document.addEventListener("keyup", handleAltKeyUp);
991
+});
0 commit comments