Fix some minor bugs related to KeyboardEvent sending
This commit is contained in:
parent
4d302956d3
commit
ccf4ed907a
2 changed files with 5 additions and 4 deletions
|
@ -10,9 +10,10 @@ namespace atom {
|
|||
ui::KeyboardCode KeyboardCodeFromCharCode(char c, bool* shifted) {
|
||||
*shifted = false;
|
||||
switch (c) {
|
||||
case 8: case 0x7F: return ui::VKEY_BACK;
|
||||
case 9: return ui::VKEY_TAB;
|
||||
case 0xD: case 3: return ui::VKEY_RETURN;
|
||||
case 0x08: return ui::VKEY_BACK;
|
||||
case 0x7F: return ui::VKEY_DELETE;
|
||||
case 0x09: return ui::VKEY_TAB;
|
||||
case 0x0D: return ui::VKEY_RETURN;
|
||||
case 0x1B: return ui::VKEY_ESCAPE;
|
||||
case ' ': return ui::VKEY_SPACE;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ struct Converter<blink::WebInputEvent::Type> {
|
|||
else if (type == "mousewheel")
|
||||
*out = blink::WebInputEvent::MouseWheel;
|
||||
else if (type == "keydown")
|
||||
*out = blink::WebInputEvent::KeyDown;
|
||||
*out = blink::WebInputEvent::RawKeyDown;
|
||||
else if (type == "keyup")
|
||||
*out = blink::WebInputEvent::KeyUp;
|
||||
else if (type == "char")
|
||||
|
|
Loading…
Reference in a new issue