mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Cli: Handle special shortcuts such as Ctrl+H
This commit is contained in:
parent
01614b5a13
commit
71e01e5566
@ -367,6 +367,18 @@ class Application extends BaseApplication {
|
|||||||
output.push(itemsByCommand[n]);
|
output.push(itemsByCommand[n]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Map reserved shortcuts to their equivalent key
|
||||||
|
// https://github.com/cronvel/terminal-kit/issues/101
|
||||||
|
for (let i = 0; i < output.length; i++) {
|
||||||
|
const newKeys = output[i].keys.map(k => {
|
||||||
|
k = k.replace(/CTRL_H/g, 'BACKSPACE');
|
||||||
|
k = k.replace(/CTRL_I/g, 'TAB');
|
||||||
|
k = k.replace(/CTRL_M/g, 'ENTER');
|
||||||
|
return k;
|
||||||
|
});
|
||||||
|
output[i].keys = newKeys;
|
||||||
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user