fix: fix shortcut ctrl+enter (#5030)

This commit is contained in:
wpxp123456
2025-04-17 20:16:18 +08:00
committed by GitHub
parent fc6046499a
commit 3405651a90
2 changed files with 2 additions and 1 deletions
@@ -558,7 +558,7 @@ export class EditingRenderController extends Disposable {
: false;
if (snapshot && !(isEmpty && isCellImage)) {
const res = await this._submitEdit(snapshot, keycode === (MetaKeys.CTRL_COMMAND | KeyCode.ENTER));
const res = await this._submitEdit(snapshot, keycode === (MetaKeys.CTRL_COMMAND | KeyCode.ENTER) || keycode === (MetaKeys.MAC_CTRL | KeyCode.ENTER));
if (res === false) return; // if the submit was rejected, don't move selection
}
@@ -126,6 +126,7 @@ export const EditorCursorEscShortcut: IShortcutItem = {
export const EditorCursorCtrlEnterShortcut: IShortcutItem = {
id: SetCellEditVisibleOperation.id,
binding: KeyCode.ENTER | MetaKeys.CTRL_COMMAND,
mac: KeyCode.ENTER | MetaKeys.MAC_CTRL,
preconditions: (contextService) => whenEditorDidNotInputFormulaActivated(contextService),
staticParameters: {
visible: false,