From 1fcf41c0a8e3b28ca7cb83d525a3730d00ac62e7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 19 Jun 2023 12:13:46 +0400 Subject: [PATCH] Update keymaps add jsdoc --- src/keymaps/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/keymaps/index.ts b/src/keymaps/index.ts index b9377d62b..dd876c99f 100644 --- a/src/keymaps/index.ts +++ b/src/keymaps/index.ts @@ -85,18 +85,22 @@ export default class KeymapsModule extends Module { * console.log('do stuff'); * }); * // or - * keymaps.add('ns:my-keymap', '⌘+s, ctrl+s', 'some-gjs-command'); + * keymaps.add('ns:my-keymap', '⌘+s, ctrl+s', 'some-gjs-command', { + * // Prevent the default browser action + * prevent: true, + * }); * * // listen to events - * editor.on('keymap:emit', (id, shortcut, e) => { + * editor.on('keymap:emit', (id, shortcut, event) => { * // ... * }) */