Skip to content

Commit

Permalink
hotkey to flip colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragzouken committed Aug 5, 2024
1 parent 64efe98 commit 95c387e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/scripts/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,16 @@ class BipsiEditor extends EventTarget {
event.preventDefault();
}
});

if (event.key.toLocaleLowerCase()) {
event.preventDefault();

const prevFg = this.fgIndex.value;
const prevBg = this.bgIndex.value;

this.fgIndex.selectedIndex = prevBg;
this.bgIndex.selectedIndex = prevFg;
}
}

// if (event.altKey && this.heldColorPick === undefined) {
Expand Down

0 comments on commit 95c387e

Please sign in to comment.