listen to shift when in Linux
This commit is contained in:
@@ -319,7 +319,7 @@ export class SelectionManager extends EventEmitter {
|
|||||||
private _onMouseDown(event: MouseEvent) {
|
private _onMouseDown(event: MouseEvent) {
|
||||||
// Ignore this event when selection is disabled
|
// Ignore this event when selection is disabled
|
||||||
if (!this._enabled) {
|
if (!this._enabled) {
|
||||||
if (!event.altKey) {
|
if (!(Browser.isLinux ? event.shiftKey : event.altKey)) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -339,8 +339,8 @@ export class SelectionManager extends EventEmitter {
|
|||||||
// Reset drag scroll state
|
// Reset drag scroll state
|
||||||
this._dragScrollAmount = 0;
|
this._dragScrollAmount = 0;
|
||||||
|
|
||||||
if (event.shiftKey) {
|
if (this._enabled && event.shiftKey) {
|
||||||
this._onShiftClick(event);
|
this._onIncrementalClick(event);
|
||||||
} else {
|
} else {
|
||||||
if (event.detail === 1) {
|
if (event.detail === 1) {
|
||||||
this._onSingleClick(event);
|
this._onSingleClick(event);
|
||||||
@@ -376,11 +376,11 @@ export class SelectionManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs a shift click, setting the selection end position to the mouse
|
* Performs an incremental click, setting the selection end position to the mouse
|
||||||
* position.
|
* position.
|
||||||
* @param event The mouse event.
|
* @param event The mouse event.
|
||||||
*/
|
*/
|
||||||
private _onShiftClick(event: MouseEvent): void {
|
private _onIncrementalClick(event: MouseEvent): void {
|
||||||
if (this._model.selectionStart) {
|
if (this._model.selectionStart) {
|
||||||
this._model.selectionEnd = this._getMouseBufferCoords(event);
|
this._model.selectionEnd = this._getMouseBufferCoords(event);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user