mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
comment explaining scope in keyboard actions
This commit is contained in:
parent
5b85713bf3
commit
9413cd2296
@ -7,6 +7,15 @@ const utils = require('./utils');
|
|||||||
const isMac = process.platform === "darwin";
|
const isMac = process.platform === "darwin";
|
||||||
const isElectron = utils.isElectron();
|
const isElectron = utils.isElectron();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scope here means on which element the keyboard shortcuts are attached - this means that for the shortcut to work,
|
||||||
|
* the focus has to be inside the element.
|
||||||
|
*
|
||||||
|
* So e.g. shortcuts with "note-tree" scope work only when the focus is in note tree.
|
||||||
|
* This allows to have the same shortcut have different actions attached based on the context
|
||||||
|
* e.g. CTRL-C in note tree does something a bit different from CTRL-C in the text editor.
|
||||||
|
*/
|
||||||
|
|
||||||
const DEFAULT_KEYBOARD_ACTIONS = [
|
const DEFAULT_KEYBOARD_ACTIONS = [
|
||||||
{
|
{
|
||||||
separator: "Note navigation"
|
separator: "Note navigation"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user