Hi,
I am trying to test a capslock indicator with Siesta by this code:
t.chain({
type: '[CAPS]'
}, {
type: 'test',
target: passwordfield
})
The KeyboardEvent I get on running the test indeed contains the getModifierState function, which unfortunately does not return the correct value for getModifierState('CapsLock').
As this might be one of the main use cases for the caps keycode, is there any solution or workaround for this?
Regards,
Laura
Hello,
Unfortunately, for synthetic events switching the state of the CAPSLOCK button is not possible. You can however simulate the "SHIFT" key pressing with options
config:
t.chain(
{ type : 'test', target : 't', options : { shiftKey : true } }
)
Read the API documentation