Referencing the code snippets from vscode-tree.ts
const listenedKeys: ListenedKey[] = [
' ',
'ArrowDown',
'ArrowUp',
'ArrowLeft',
'ArrowRight',
'Enter',
'Escape',
'Shift',
];
// ...
private _handleComponentKeyDown = (ev: KeyboardEvent) => {
const key = ev.key as ListenedKey;
if (listenedKeys.includes(key)) {
ev.stopPropagation();
ev.preventDefault();
}
switch (key) {
// NB: no handler for key === 'Escape'
// ...
}
}
any keyDown/keyPress events on a VscodeTree are not allowed to bubble up outside the tree, but the component itself does nothing with these events. Should 'Escaped' be removed from listenedKeys?
Happy to open a PR for this if needed. TIA!
Referencing the code snippets from
vscode-tree.tsany keyDown/keyPress events on a VscodeTree are not allowed to bubble up outside the tree, but the component itself does nothing with these events. Should 'Escaped' be removed from
listenedKeys?Happy to open a PR for this if needed. TIA!