mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-24 09:21:35 +01:00
Merge pull request #206135 from microsoft/merogge/link-view
enable link activation for SR users in accessible view
This commit is contained in:
@@ -29,6 +29,7 @@ import { IAccessibilityService } from 'vs/platform/accessibility/common/accessib
|
||||
import { createAndFillInActionBarActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { WorkbenchToolBar } from 'vs/platform/actions/browser/toolbar';
|
||||
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextViewDelegate, IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
@@ -157,7 +158,8 @@ export class AccessibleView extends Disposable {
|
||||
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
|
||||
@IKeybindingService private readonly _keybindingService: IKeybindingService,
|
||||
@ILayoutService private readonly _layoutService: ILayoutService,
|
||||
@IMenuService private readonly _menuService: IMenuService
|
||||
@IMenuService private readonly _menuService: IMenuService,
|
||||
@ICommandService private readonly _commandService: ICommandService
|
||||
) {
|
||||
super();
|
||||
|
||||
@@ -252,6 +254,7 @@ export class AccessibleView extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
showLastProvider(id: AccessibleViewProviderId): void {
|
||||
if (!this._lastProvider || this._lastProvider.options.id !== id) {
|
||||
return;
|
||||
@@ -514,7 +517,9 @@ export class AccessibleView extends Disposable {
|
||||
};
|
||||
const disposableStore = new DisposableStore();
|
||||
disposableStore.add(this._editorWidget.onKeyDown((e) => {
|
||||
if (e.keyCode === KeyCode.Escape || shouldHide(e.browserEvent, this._keybindingService, this._configurationService)) {
|
||||
if (e.keyCode === KeyCode.Enter) {
|
||||
this._commandService.executeCommand('editor.action.openLink');
|
||||
} else if (e.keyCode === KeyCode.Escape || shouldHide(e.browserEvent, this._keybindingService, this._configurationService)) {
|
||||
hide(e);
|
||||
} else if (e.keyCode === KeyCode.KeyH && provider.options.readMoreUrl) {
|
||||
const url: string = provider.options.readMoreUrl;
|
||||
|
||||
Reference in New Issue
Block a user