add functionality when user pressed enter key

This commit is contained in:
2024-08-31 19:14:49 +00:00
parent be78e17fb9
commit a067690610

View File

@@ -12,10 +12,9 @@ const Rename = (props: Props) => {
const handleKeyDown = (event: React.KeyboardEvent) => {
if (event.key === "Escape") {
console.log("esc");
closeRemapFunction();
} else if (event.key === "Enter") {
console.log("enter pressed");
renameCallback(file, newName);
}
};