mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Support Shift+Up/Down keys in notebook outputs (#209314)
This commit is contained in:
parent
166a042fcc
commit
78cfeea7ba
|
@ -311,6 +311,13 @@ async function webviewPreloads(ctx: PreloadContext) {
|
|||
if (!lastFocusedOutput?.id || !e.shiftKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we're pressing `Shift+Up/Down` then we want to select a line at a time.
|
||||
if (e.shiftKey && (e.code === 'ArrowUp' || e.code === 'ArrowDown')) {
|
||||
e.stopPropagation(); // We don't want the notebook to handle this, default behavior is what we need.
|
||||
return;
|
||||
}
|
||||
|
||||
// We want to handle just `Shift + PageUp/PageDown` & `Shift + Cmd + ArrowUp/ArrowDown` (for mac)
|
||||
if (!(e.code === 'PageUp' || e.code === 'PageDown') && !(e.metaKey && (e.code === 'ArrowDown' || e.code === 'ArrowUp'))) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue