Fixed #71134#71500
Conversation
|
Thanks! |
|
@kostyabushuev @joaomoreno I can still reproduce it. I think this should also be fixed here vscode/src/vs/workbench/services/keybinding/browser/keybindingService.ts Lines 532 to 542 in 52b6e7c |
|
Hmm, interesting |
|
Try using up-to-date master branch which already has the changes from this PR |
|
@jeanp413 |
|
@kostyabushuev I think I fixed it with this changes. I tested it on ubuntu 18.04 and it's working. Not sure if you need to create a new PR or push the changes here and @joaomoreno could merge it again. --- a/src/vs/workbench/services/keybinding/browser/keybindingService.ts
+++ b/src/vs/workbench/services/keybinding/browser/keybindingService.ts
@@ -46,7 +46,7 @@ import { IKeymapService } from 'vs/workbench/services/keybinding/common/keymapIn
import { getDispatchConfig } from 'vs/workbench/services/keybinding/common/dispatchConfig';
import { isArray } from 'vs/base/common/types';
import { INavigatorWithKeyboard } from 'vs/workbench/services/keybinding/common/navigatorKeyboard';
-import { ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from 'vs/base/common/scanCode';
+import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, IMMUTABLE_KEY_CODE_TO_CODE } from 'vs/base/common/scanCode';
interface ContributedKeyBinding {
command: string;
@@ -535,6 +535,29 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
return false;
}
const code = ScanCodeUtils.toEnum(event.code);
+
+ const NUMPAD_PRINTABLE_SCANCODES = [
+ ScanCode.NumpadDivide,
+ ScanCode.NumpadMultiply,
+ ScanCode.NumpadSubtract,
+ ScanCode.NumpadAdd,
+ ScanCode.Numpad1,
+ ScanCode.Numpad2,
+ ScanCode.Numpad3,
+ ScanCode.Numpad4,
+ ScanCode.Numpad5,
+ ScanCode.Numpad6,
+ ScanCode.Numpad7,
+ ScanCode.Numpad8,
+ ScanCode.Numpad9,
+ ScanCode.Numpad0,
+ ScanCode.NumpadDecimal
+ ];
+ const immutableScanCode = IMMUTABLE_KEY_CODE_TO_CODE[event.keyCode];
+ if (NUMPAD_PRINTABLE_SCANCODES.indexOf(code) >= 0 && code === immutableScanCode) {
+ return true;
+ }
+
const keycode = IMMUTABLE_CODE_TO_KEY_CODE[code];
if (keycode !== -1) {
// https://github.com/microsoft/vscode/issues/74934 |
|
Created another PR #77911 with the proposed solution |
No description provided.