提交 699101e3 编写于 作者: A Alex Dima

Use Alt to avoid collision with font zooming & other small tweaks

上级 986de605
......@@ -188,4 +188,4 @@ export class StandardWheelEvent {
}
}
}
}
}
\ No newline at end of file
......@@ -341,12 +341,10 @@ export abstract class AbstractScrollableElement extends Widget {
deltaY = 0;
}
if (e.browserEvent.shiftKey !== null) {
//fastScrolling
if (e.browserEvent.shiftKey) {
deltaX = deltaX * this._options.fastScrollSensitivity;
deltaY = deltaY * this._options.fastScrollSensitivity;
}
if (e.browserEvent && e.browserEvent.altKey) {
// fastScrolling
deltaX = deltaX * this._options.fastScrollSensitivity;
deltaY = deltaY * this._options.fastScrollSensitivity;
}
const futureScrollPosition = this._scrollable.getFutureScrollPosition();
......
......@@ -51,8 +51,8 @@ export interface ScrollableElementCreationOptions {
*/
mouseWheelScrollSensitivity?: number;
/**
* FastScrolling mulitplier speed when pressing `Shift`
* Defaults to 10.
* FastScrolling mulitplier speed when pressing `Alt`
* Defaults to 5.
*/
fastScrollSensitivity?: number;
/**
......
......@@ -431,14 +431,8 @@ const editorConfiguration: IConfigurationNode = {
},
'editor.fastScrollSensitivity': {
'type': 'number',
'enum': [1, 5, 10],
enumDescriptions: [
nls.localize('fastScrollSensitivity.1', "Fast Scrolling Off"),
nls.localize('fastScrollSensitivity.5', "Default Speed"),
nls.localize('fastScrollSensitivity.10', "Fast Speed"),
],
'default': EDITOR_DEFAULTS.viewInfo.scrollbar.fastScrollSensitivity,
'markdownDescription': nls.localize('fastScrollSensitivity', "Scrolling speed mulitiplier when pressing `Shift`")
'markdownDescription': nls.localize('fastScrollSensitivity', "Scrolling speed mulitiplier when pressing `Alt`")
},
'editor.multiCursorModifier': {
'type': 'string',
......
......@@ -459,8 +459,8 @@ export interface IEditorOptions {
*/
mouseWheelScrollSensitivity?: number;
/**
* FastScrolling mulitplier speed when pressing `Shift`
* Defaults to 10.
* FastScrolling mulitplier speed when pressing `Alt`
* Defaults to 5.
*/
fastScrollSensitivity?: number;
/**
......@@ -1976,7 +1976,7 @@ export class EditorOptionsValidator {
let fastScrollSensitivity = _float(opts.fastScrollSensitivity, defaults.scrollbar.fastScrollSensitivity);
if (fastScrollSensitivity <= 0) {
fastScrollSensitivity = 5;
fastScrollSensitivity = defaults.scrollbar.fastScrollSensitivity;
}
const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity, fastScrollSensitivity);
const minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap);
......
......@@ -2788,8 +2788,8 @@ declare namespace monaco.editor {
*/
mouseWheelScrollSensitivity?: number;
/**
* FastScrolling mulitplier speed when pressing `Shift`
* Defaults to 10.
* FastScrolling mulitplier speed when pressing `Alt`
* Defaults to 5.
*/
fastScrollSensitivity?: number;
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册