mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-17 12:50:43 +00:00
Do not trigger commands if controlKey is down (to help windows users)
This commit is contained in:
@ -610,25 +610,25 @@ function RecordQuery({table, launchProcess}: Props): JSX.Element
|
||||
|
||||
if (validType && !dotMenuOpen && !keyboardHelpOpen && !activeModalProcess)
|
||||
{
|
||||
if (!e.metaKey && e.key === "n" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission)
|
||||
if (!e.metaKey && !e.ctrlKey && e.key === "n" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission)
|
||||
{
|
||||
e.preventDefault();
|
||||
navigate(`${metaData?.getTablePathByName(tableName)}/create`);
|
||||
}
|
||||
else if (!e.metaKey && e.key === "r")
|
||||
else if (!e.metaKey && !e.ctrlKey && e.key === "r")
|
||||
{
|
||||
e.preventDefault();
|
||||
updateTable("'r' keyboard event");
|
||||
}
|
||||
/*
|
||||
// disable until we add a ... ref down to let us programmatically open Columns button
|
||||
else if (! e.metaKey && e.key === "c")
|
||||
else if (! e.metaKey && !e.ctrlKey && e.key === "c")
|
||||
{
|
||||
e.preventDefault()
|
||||
gridApiRef.current.showPreferences(GridPreferencePanelsValue.columns)
|
||||
}
|
||||
*/
|
||||
else if (!e.metaKey && e.key === "f")
|
||||
else if (!e.metaKey && !e.ctrlKey && e.key === "f")
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -164,27 +164,27 @@ function RecordView({table, launchProcess}: Props): JSX.Element
|
||||
|
||||
if (validType && !dotMenuOpen && !keyboardHelpOpen && !showAudit && !showEditChildForm)
|
||||
{
|
||||
if (!e.metaKey && e.key === "n" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission)
|
||||
if (!e.metaKey && !e.ctrlKey && e.key === "n" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission)
|
||||
{
|
||||
e.preventDefault();
|
||||
gotoCreate();
|
||||
}
|
||||
else if (!e.metaKey && e.key === "e" && table.capabilities.has(Capability.TABLE_UPDATE) && table.editPermission)
|
||||
else if (!e.metaKey && !e.ctrlKey && e.key === "e" && table.capabilities.has(Capability.TABLE_UPDATE) && table.editPermission)
|
||||
{
|
||||
e.preventDefault();
|
||||
navigate("edit");
|
||||
}
|
||||
else if (!e.metaKey && e.key === "c" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission)
|
||||
else if (!e.metaKey && !e.ctrlKey && e.key === "c" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission)
|
||||
{
|
||||
e.preventDefault();
|
||||
navigate("copy");
|
||||
}
|
||||
else if (!e.metaKey && e.key === "d" && table.capabilities.has(Capability.TABLE_DELETE) && table.deletePermission)
|
||||
else if (!e.metaKey && !e.ctrlKey && e.key === "d" && table.capabilities.has(Capability.TABLE_DELETE) && table.deletePermission)
|
||||
{
|
||||
e.preventDefault();
|
||||
handleClickDeleteButton();
|
||||
}
|
||||
else if (!e.metaKey && e.key === "a" && metaData && metaData.tables.has("audit"))
|
||||
else if (!e.metaKey && !e.ctrlKey && e.key === "a" && metaData && metaData.tables.has("audit"))
|
||||
{
|
||||
e.preventDefault();
|
||||
navigate("#audit");
|
||||
|
Reference in New Issue
Block a user