Merge pull request #8561 from liusy182/!-liusy182-br
add 'code' property in 'before-input-event''s 'input' argument
This commit is contained in:
commit
604c2470bc
3 changed files with 8 additions and 0 deletions
|
@ -224,6 +224,8 @@ v8::Local<v8::Value> Converter<content::NativeWebKeyboardEvent>::ToV8(
|
|||
else if (in.type == blink::WebInputEvent::Type::KeyUp)
|
||||
dict.Set("type", "keyUp");
|
||||
dict.Set("key", ui::KeycodeConverter::DomKeyToKeyString(in.domKey));
|
||||
dict.Set("code", ui::KeycodeConverter::DomCodeToCodeString(
|
||||
static_cast<ui::DomCode>(in.domCode)));
|
||||
|
||||
using Modifiers = blink::WebInputEvent::Modifiers;
|
||||
dict.Set("isAutoRepeat", (in.modifiers & Modifiers::IsAutoRepeat) != 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue