mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: add missing isComposing KeyboardEvent property (#23996)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -366,6 +366,7 @@ Returns:
|
||||
* `key` String - Equivalent to [KeyboardEvent.key][keyboardevent].
|
||||
* `code` String - Equivalent to [KeyboardEvent.code][keyboardevent].
|
||||
* `isAutoRepeat` Boolean - Equivalent to [KeyboardEvent.repeat][keyboardevent].
|
||||
* `isComposing` Boolean - Equivalent to [KeyboardEvent.isComposing][keyboardevent].
|
||||
* `shift` Boolean - Equivalent to [KeyboardEvent.shiftKey][keyboardevent].
|
||||
* `control` Boolean - Equivalent to [KeyboardEvent.controlKey][keyboardevent].
|
||||
* `alt` Boolean - Equivalent to [KeyboardEvent.altKey][keyboardevent].
|
||||
|
||||
@@ -302,6 +302,7 @@ v8::Local<v8::Value> Converter<content::NativeWebKeyboardEvent>::ToV8(
|
||||
|
||||
using Modifiers = blink::WebInputEvent::Modifiers;
|
||||
dict.Set("isAutoRepeat", (in.GetModifiers() & Modifiers::kIsAutoRepeat) != 0);
|
||||
dict.Set("isComposing", (in.GetModifiers() & Modifiers::kIsComposing) != 0);
|
||||
dict.Set("shift", (in.GetModifiers() & Modifiers::kShiftKey) != 0);
|
||||
dict.Set("control", (in.GetModifiers() & Modifiers::kControlKey) != 0);
|
||||
dict.Set("alt", (in.GetModifiers() & Modifiers::kAltKey) != 0);
|
||||
|
||||
Reference in New Issue
Block a user