Do not trigger commands if controlKey is down (to help windows users)

This commit is contained in:
2024-04-15 10:41:45 -05:00
parent ddb055bc81
commit 4339f74c07
2 changed files with 9 additions and 9 deletions

View File

@ -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();

View File

@ -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");