# clide default keymap. # # This is the baseline preset. Vim / VSCode / JetBrains presets are # their own files (T-64/T-65/T-66) and replace bindings via the same # YAML shape. # # Each binding: # intent: # see kernel/src/keymap/intents.dart # keys: | [, ...] # `ctrl+shift+p`, `cmd+enter`, ... # when: # optional; VS-Code-style boolean expr # # Identifiers in `when:` are scope flags published by producing # services (e.g. `palette.open` when ClidePalette is mounted + # visible). Missing flags evaluate to false. name: default bindings: # -- Activation / focus ----------------------------------------------- # ActivateIntent has no when-clause: it dispatches via Actions.maybeInvoke # against the focused context, so only widgets that opt in (ClideTappable's # Actions wrapper) actually catch it. Text-input widgets handle Enter # themselves first. - intent: activate keys: [enter, space] - intent: dismiss keys: escape - intent: focus.next keys: tab - intent: focus.previous keys: shift+tab # Panel-to-panel cycling (sidebar → workspace → context). # VS Code convention. - intent: focus.nextPanel keys: f6 - intent: focus.previousPanel keys: shift+f6 # -- Command palette -------------------------------------------------- - intent: palette.open keys: [ctrl+shift+p, meta+shift+p] - intent: palette.selectNext keys: [down, ctrl+n] when: palette.open - intent: palette.selectPrevious keys: [up, ctrl+p] when: palette.open - intent: palette.accept keys: enter when: palette.open - intent: dismiss keys: escape when: palette.open # -- Quick open (fuzzy file finder) ----------------------------------- # ctrl+p / meta+p are free while the palette is closed; the palette # only claims ctrl+p for selectPrevious `when: palette.open`, so this # is conflict-free. Arrow/enter/escape inside the overlay are handled # locally by the widget. # `shift shift` (double-tap) is the JetBrains "Search Everywhere" gesture; # clide aliases it to the quick-open finder across all presets (T-341). - intent: quickOpen.open keys: [ctrl+p, meta+p, shift shift] when: "!palette.open" # Nav stays on arrows/ctrl+n (not ctrl+p — that's the open chord and # would collide while the overlay is up). - intent: quickOpen.selectNext keys: [down, ctrl+n] when: quickOpen.open - intent: quickOpen.selectPrevious keys: up when: quickOpen.open - intent: quickOpen.accept keys: enter when: quickOpen.open - intent: dismiss keys: escape when: quickOpen.open # -- Find in files ---------------------------------------------------- - intent: findInFiles.open keys: [ctrl+shift+f, meta+shift+f] # -- Text scale ------------------------------------------------------- # On most layouts `+` is `shift+equal`; we bind both so users who # think of it as Ctrl+Plus and users who hit Ctrl+= both work. - intent: text.scaleIncrease keys: [ctrl+equal, ctrl+shift+equal, meta+equal, meta+shift+equal] - intent: text.scaleDecrease keys: [ctrl+minus, meta+minus] - intent: text.scaleReset keys: [ctrl+0, meta+0] # -- File (application menu, T-48) ------------------------------------- - intent: command:file.openFolder keys: [ctrl+o, meta+o] - intent: command:file.newWindow keys: [ctrl+shift+n, meta+shift+n]