From 8682a5c6aabb0a00f0fe554c8717294e7f36e561 Mon Sep 17 00:00:00 2001 From: Sidharth Mohanty Date: Mon, 13 Nov 2023 15:11:49 +0530 Subject: [PATCH] chore(core): update keyboardevent to have code attr and update deprecated attrs --- packages/docs/src/routes/api/qwik/api.json | 2 +- packages/docs/src/routes/api/qwik/index.md | 1 + packages/qwik/src/core/api.md | 8 +++++--- .../qwik/src/core/render/jsx/types/jsx-qwik-events.ts | 4 ++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/docs/src/routes/api/qwik/api.json b/packages/docs/src/routes/api/qwik/api.json index 1ac65209b0c..da891ed310a 100644 --- a/packages/docs/src/routes/api/qwik/api.json +++ b/packages/docs/src/routes/api/qwik/api.json @@ -1848,7 +1848,7 @@ } ], "kind": "Interface", - "content": "```typescript\nexport interface QwikKeyboardEvent extends SyntheticEvent \n```\n**Extends:** SyntheticEvent<T, [NativeKeyboardEvent](#nativekeyboardevent)>\n\n\n| Property | Modifiers | Type | Description |\n| --- | --- | --- | --- |\n| [altKey](#) | | boolean | |\n| [charCode](#) | | number | |\n| [ctrlKey](#) | | boolean | |\n| [isComposing](#) | | boolean | |\n| [key](#) | | string | See the \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#named-key-attribute-values). for possible values |\n| [keyCode](#) | | number | |\n| [locale](#) | | string | |\n| [location](#) | | number | |\n| [metaKey](#) | | boolean | |\n| [repeat](#) | | boolean | |\n| [shiftKey](#) | | boolean | |\n| [which](#) | | number | |\n\n\n| Method | Description |\n| --- | --- |\n| [getModifierState(key)](#qwikkeyboardevent-getmodifierstate) | See \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#keys-modifier). for a list of valid (case-sensitive) arguments to this method. |", + "content": "```typescript\nexport interface QwikKeyboardEvent extends SyntheticEvent \n```\n**Extends:** SyntheticEvent<T, [NativeKeyboardEvent](#nativekeyboardevent)>\n\n\n| Property | Modifiers | Type | Description |\n| --- | --- | --- | --- |\n| [altKey](#) | | boolean | |\n| [charCode](#) | | number | |\n| [code](#) | | string | |\n| [ctrlKey](#) | | boolean | |\n| [isComposing](#) | | boolean | |\n| [key](#) | | string | See the \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#named-key-attribute-values). for possible values |\n| [keyCode](#) | | number | |\n| [locale](#) | | string | |\n| [location](#) | | number | |\n| [metaKey](#) | | boolean | |\n| [repeat](#) | | boolean | |\n| [shiftKey](#) | | boolean | |\n| [which](#) | | number | |\n\n\n| Method | Description |\n| --- | --- |\n| [getModifierState(key)](#qwikkeyboardevent-getmodifierstate) | See \\[DOM Level 3 Events spec\\](https://www.w3.org/TR/uievents-key/\\#keys-modifier). for a list of valid (case-sensitive) arguments to this method. |", "editUrl": "https://github.com/BuilderIO/qwik/tree/main/packages/qwik/src/core/render/jsx/types/jsx-qwik-events.ts", "mdFile": "qwik.qwikkeyboardevent.md" }, diff --git a/packages/docs/src/routes/api/qwik/index.md b/packages/docs/src/routes/api/qwik/index.md index d1233fe2a2b..4cdb14e4fcf 100644 --- a/packages/docs/src/routes/api/qwik/index.md +++ b/packages/docs/src/routes/api/qwik/index.md @@ -2385,6 +2385,7 @@ export interface QwikKeyboardEvent extends SyntheticEvent extends SyntheticEvent { // (undocumented) altKey: boolean; - // (undocumented) + // @deprecated (undocumented) charCode: number; // (undocumented) + code: string; + // (undocumented) ctrlKey: boolean; getModifierState(key: string): boolean; // (undocumented) isComposing: boolean; key: string; - // (undocumented) + // @deprecated (undocumented) keyCode: number; // (undocumented) locale: string; @@ -1552,7 +1554,7 @@ export interface QwikKeyboardEvent extends SyntheticEvent extends SyntheticEvent { export interface QwikKeyboardEvent extends SyntheticEvent { isComposing: boolean; altKey: boolean; + /** @deprecated Deprecated. */ charCode: number; ctrlKey: boolean; /** @@ -112,12 +113,15 @@ export interface QwikKeyboardEvent extends SyntheticEvent