Added prices change short cut funtionalies

This commit is contained in:
Srinath 2026-02-09 14:15:28 +05:30
parent 7421780920
commit 58c6404699
1 changed files with 20 additions and 15 deletions

View File

@ -256,11 +256,17 @@ const BSBillingTable6 = () => {
};
const handleKeyDown = (event) => {
if (!preferenceshortcutkey) return
if (!event.ctrlKey) return;
const key = event.key.toLowerCase();
// 👉 ALT + P Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (tableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
@ -272,7 +278,6 @@ const BSBillingTable6 = () => {
handleShortcut('price');
}
};
window.addEventListener('keydown', handleKeyDown);
return () => {