@codemirror/view 6.2.5 → 6.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1219,7 +1219,7 @@ interface KeyBinding {
1219
1219
  command function returns `false`, further bindings will be tried
1220
1220
  for the key.
1221
1221
  */
1222
- run: Command;
1222
+ run?: Command;
1223
1223
  /**
1224
1224
  When given, this defines a second binding, using the (possibly
1225
1225
  platform-specific) key name prefixed with `Shift-` to activate
@@ -1227,6 +1227,11 @@ interface KeyBinding {
1227
1227
  */
1228
1228
  shift?: Command;
1229
1229
  /**
1230
+ When this property is present, the function is called for every
1231
+ key that is not a multi-stroke prefix.
1232
+ */
1233
+ any?: (view: EditorView, event: KeyboardEvent) => boolean;
1234
+ /**
1230
1235
  By default, key bindings apply when focus is on the editor
1231
1236
  content (the `"editor"` scope). Some extensions, mostly those
1232
1237
  that define their own panels, might want to allow you to