提交 92b27ec1 编写于 作者: A Alex Dima

Log kb layout

上级 eab23cd0
......@@ -23,7 +23,7 @@ import { IKeybindingRule, KeybindingsRegistry } from 'vs/platform/keybinding/com
import { Registry } from 'vs/platform/platform';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { keybindingsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
import { getNativeLabelProvider, getNativeAriaLabelProvider } from 'vs/workbench/services/keybinding/electron-browser/nativeKeymap';
import { getCurrentKeyboardLayout, getNativeLabelProvider, getNativeAriaLabelProvider } from 'vs/workbench/services/keybinding/electron-browser/nativeKeymap';
import { IMessageService } from 'vs/platform/message/common/message';
import { ConfigWatcher } from 'vs/base/node/config';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
......@@ -166,6 +166,8 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
}));
keybindingsTelemetry(telemetryService, this);
let data = getCurrentKeyboardLayout();
telemetryService.publicLog('keyboardLayout', data);
}
private _safeGetConfig(): IUserFriendlyKeybinding[] {
......
......@@ -24,6 +24,10 @@ let getNativeKeymap = (function () {
};
})();
export function getCurrentKeyboardLayout() {
return nativeKeymap.getCurrentKeyboardLayout();
}
// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
// See https://github.com/Microsoft/node-native-keymap/blob/master/deps/chromium/keyboard_codes_win.h
const NATIVE_KEY_CODE_TO_KEY_CODE: { [nativeKeyCode: string]: KeyCode; } = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册