Skip to content

KeyboardEvent fired as a result of SendKeys does not have all the fields set properly #10

Description

@shayanelhami

When you issue a SendKey() the resulting keydown/keypress/keyup events do not have code, keyCode, which fields set.

Example: inputs[0].SendKeys("a") results in:

altKey:false
bubbles:true
cancelBubble:false
cancelable:true
charCode:0
code:""
composed:true
ctrlKey:false
currentTarget:null
defaultPrevented:false
detail:0
eventPhase:0
isComposing:false
isTrusted:true
key:"a"
keyCode:0
location:0
metaKey:false
path:Array(5)
repeat:false
returnValue:true
shiftKey:false
sourceCapabilities:InputDeviceCapabilities
srcElement:input#txt
target:input#txt
timeStamp:0
type:"keydown"
view:Window
which:0

whereas a real key generates:

altKey:false
bubbles:true
cancelBubble:false
cancelable:true
charCode:0
code:"KeyA"
composed:true
ctrlKey:false
currentTarget:null
defaultPrevented:false
detail:0
eventPhase:0
isComposing:false
isTrusted:true
key:"a"
keyCode:65
location:0
metaKey:false
path:Array(5)
repeat:false
returnValue:true
shiftKey:false
sourceCapabilities:InputDeviceCapabilities
srcElement:input#txt
target:input#txt
timeStamp:184020.115
type:"keydown"
view:Window
which:65

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions