fix(SelectionAssistant): support selection when alt key pressed (#6865)
fix: support alt key selection
This commit is contained in:
@@ -812,8 +812,8 @@ export class SelectionService {
|
||||
if (this.triggerMode === TriggerMode.Ctrlkey && this.isCtrlkey(data.vkCode)) {
|
||||
return
|
||||
}
|
||||
//dont hide toolbar when shiftkey is pressed, because it's used for selection
|
||||
if (this.isShiftkey(data.vkCode)) {
|
||||
//dont hide toolbar when shiftkey or altkey is pressed, because it's used for selection
|
||||
if (this.isShiftkey(data.vkCode) || this.isAltkey(data.vkCode)) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -901,6 +901,11 @@ export class SelectionService {
|
||||
return vkCode === 160 || vkCode === 161
|
||||
}
|
||||
|
||||
//check if the key is alt key
|
||||
private isAltkey(vkCode: number) {
|
||||
return vkCode === 164 || vkCode === 165
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a preloaded action window for quick response
|
||||
* Action windows handle specific operations on selected text
|
||||
|
||||
Reference in New Issue
Block a user