diff --git a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue index 9fea597e9d..9c56d8f896 100644 --- a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue +++ b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue @@ -230,7 +230,7 @@ if (props.fromTableExplorer) { diff --git a/packages/nc-gui/components/smartsheet/details/Fields.vue b/packages/nc-gui/components/smartsheet/details/Fields.vue index 7e5ad0baad..6b104d1e20 100644 --- a/packages/nc-gui/components/smartsheet/details/Fields.vue +++ b/packages/nc-gui/components/smartsheet/details/Fields.vue @@ -606,12 +606,31 @@ onKeyDown('ArrowUp', () => { }) onKeyDown('Delete', () => { + if (document.activeElement?.tagName === 'INPUT') return const isDeletedField = fieldStatus(activeField.value) === 'delete' if (!isDeletedField && activeField.value) { onFieldDelete(activeField.value) } }) +onKeyDown('Backspace', () => { + if (document.activeElement?.tagName === 'INPUT') return + const isDeletedField = fieldStatus(activeField.value) === 'delete' + if (!isDeletedField && activeField.value) { + onFieldDelete(activeField.value) + } +}) + +onKeyDown('ArrowRight', () => { + if (document.activeElement?.tagName === 'INPUT') return + if (activeField.value) { + const input = document.querySelector('.nc-fields-input') + if (input) { + input.focus() + } + } +}) + const keys = useMagicKeys() whenever(keys.altleft_c, () => { @@ -619,6 +638,11 @@ whenever(keys.altleft_c, () => { if (openedViewsTab.value === 'field') addField() }) +whenever(keys.option_c, () => { + if (!meta.value?.id) return + if (openedViewsTab.value === 'field') addField() +}) + whenever(keys.meta_s, () => { if (!meta.value?.id) return if (openedViewsTab.value === 'field') saveChanges()