Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d9ed5aac
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d9ed5aac
编写于
3月 07, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - declarative keybinding service
上级
5103a2f6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
8 deletion
+6
-8
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+0
-5
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
...services/keybinding/electron-browser/keybindingService.ts
+5
-3
src/vs/workbench/workbench.main.ts
src/vs/workbench/workbench.main.ts
+1
-0
未找到文件。
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
d9ed5aac
...
...
@@ -33,7 +33,6 @@ import { IStorageService, StorageScope, IWillSaveStateEvent, WillSaveStateReason
import
{
ContextMenuService
as
HTMLContextMenuService
}
from
'
vs/platform/contextview/browser/contextMenuService
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ContextKeyService
}
from
'
vs/platform/contextkey/browser/contextKeyService
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
...
...
@@ -110,7 +109,6 @@ import { TextResourcePropertiesService } from 'vs/workbench/services/textfile/no
// import@electron-browser
import
{
ContextMenuService
as
NativeContextMenuService
}
from
'
vs/workbench/services/contextmenu/electron-browser/contextmenuService
'
;
import
{
WorkbenchKeybindingService
}
from
'
vs/workbench/services/keybinding/electron-browser/keybindingService
'
;
import
{
LifecycleService
}
from
'
vs/platform/lifecycle/electron-browser/lifecycleService
'
;
import
{
WindowService
}
from
'
vs/platform/windows/electron-browser/windowService
'
;
import
{
RemoteAuthorityResolverService
}
from
'
vs/platform/remote/electron-browser/remoteAuthorityResolverService
'
;
...
...
@@ -420,9 +418,6 @@ export class Workbench extends Disposable implements IWorkbenchLayoutService {
// Context Keys
serviceCollection
.
set
(
IContextKeyService
,
new
SyncDescriptor
(
ContextKeyService
));
// Keybindings
serviceCollection
.
set
(
IKeybindingService
,
new
SyncDescriptor
(
WorkbenchKeybindingService
,
[
window
]));
// Context view service
serviceCollection
.
set
(
IContextViewService
,
new
SyncDescriptor
(
ContextViewService
,
[
this
.
workbench
],
true
));
...
...
src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
浏览文件 @
d9ed5aac
...
...
@@ -22,7 +22,7 @@ import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/commo
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
Extensions
,
IJSONContributionRegistry
}
from
'
vs/platform/jsonschemas/common/jsonContributionRegistry
'
;
import
{
AbstractKeybindingService
}
from
'
vs/platform/keybinding/common/abstractKeybindingService
'
;
import
{
IKeybindingEvent
,
IKeyboardEvent
,
IUserFriendlyKeybinding
,
KeybindingSource
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IKeybindingEvent
,
IKeyboardEvent
,
IUserFriendlyKeybinding
,
KeybindingSource
,
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
KeybindingResolver
}
from
'
vs/platform/keybinding/common/keybindingResolver
'
;
import
{
IKeybindingItem
,
IKeybindingRule2
,
KeybindingWeight
,
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
ResolvedKeybindingItem
}
from
'
vs/platform/keybinding/common/resolvedKeybindingItem
'
;
...
...
@@ -40,6 +40,7 @@ import { IWindowsKeyboardMapping, WindowsKeyboardMapper, windowsKeyboardMappingE
import
{
IWindowService
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
MenuRegistry
}
from
'
vs/platform/actions/common/actions
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
export
class
KeyboardMapperFactory
{
public
static
readonly
INSTANCE
=
new
KeyboardMapperFactory
();
...
...
@@ -269,7 +270,6 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
private
userKeybindings
:
ConfigWatcher
<
IUserFriendlyKeybinding
[]
>
;
constructor
(
windowElement
:
Window
,
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
ICommandService
commandService
:
ICommandService
,
@
ITelemetryService
telemetryService
:
ITelemetryService
,
...
...
@@ -326,7 +326,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
keybindings
:
event
.
config
})));
this
.
_register
(
dom
.
addDisposableListener
(
window
Element
,
dom
.
EventType
.
KEY_DOWN
,
(
e
:
KeyboardEvent
)
=>
{
this
.
_register
(
dom
.
addDisposableListener
(
window
,
dom
.
EventType
.
KEY_DOWN
,
(
e
:
KeyboardEvent
)
=>
{
let
keyEvent
=
new
StandardKeyboardEvent
(
e
);
let
shouldPreventDefault
=
this
.
_dispatch
(
keyEvent
,
keyEvent
.
target
);
if
(
shouldPreventDefault
)
{
...
...
@@ -712,3 +712,5 @@ const keyboardConfiguration: IConfigurationNode = {
};
configurationRegistry
.
registerConfiguration
(
keyboardConfiguration
);
registerSingleton
(
IKeybindingService
,
WorkbenchKeybindingService
);
\ No newline at end of file
src/vs/workbench/workbench.main.ts
浏览文件 @
d9ed5aac
...
...
@@ -81,6 +81,7 @@ import 'vs/workbench/services/history/browser/history';
import
'
vs/workbench/services/files/node/remoteFileService
'
;
import
'
vs/workbench/services/activity/browser/activityService
'
;
import
'
vs/workbench/browser/parts/views/views
'
;
import
'
vs/workbench/services/keybinding/electron-browser/keybindingService
'
;
import
'
vs/workbench/browser/parts/quickinput/quickInput
'
;
import
'
vs/workbench/browser/parts/quickopen/quickOpenController
'
;
import
'
vs/workbench/browser/parts/titlebar/titlebarPart
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录