Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/support vk packet #1588

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ export enum KeyCode {
ABNT_C1 = 110, // Brazilian (ABNT) Keyboard
ABNT_C2 = 111, // Brazilian (ABNT) Keyboard

/**
* VK_PACKET, 0xE7, Used to pass Unicode characters as if they were keystrokes.
* The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods.
*/
PACKET = 112,

/**
* Placed last to cover the length of the enum.
* Please do not depend on this value!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { browser } from '../browser';
import { KeyCode, KeyCodeUtils, KeyMod, SimpleKeybinding } from './key_codes';

const KEY_CODE_MAP: { [keyCode: number]: KeyCode } = new Array(230);
const KEY_CODE_MAP: { [keyCode: number]: KeyCode } = new Array(232);
const INVERSE_KEY_CODE_MAP: KeyCode[] = new Array(KeyCode.MAX_VALUE);

(function () {
Expand Down Expand Up @@ -156,6 +156,7 @@ const INVERSE_KEY_CODE_MAP: KeyCode[] = new Array(KeyCode.MAX_VALUE);
* If an Input Method Editor is processing key input and the event is keydown, return 229.
*/
define(229, KeyCode.KEY_IN_COMPOSITION);
define(231, KeyCode.PACKET);

if (process.env.SSR) {
return;
Expand Down