Please try the following example. As this involves special key combinations, "ST.play" needs to be used, defining each of the keydown and keyup events:
Code:
// WebDriver scenario
// URL: https://examples.sencha.com/extjs/7.0.0/examples/kitchensink/frame-index.html#form-login
describe('KeyMap', function() {
it('should shift-tab on a textfield to set focus on the previous field', function() {
// Focus on the password field
ST.textField('textfield[name="pass"]')
.focus();
// Shift-tab, which should set focus to the previous field (the username field)
ST.play([
{ type: 'keydown', target: '//body', key: 'Shift' },
{ type: 'keydown', target: '//body', key: 'Tab', shiftKey: true },
{ type: 'keyup', target: '//body', key: 'Shift' },
{ type: 'keyup', target: '//body', key: 'Tab' }
]);
// Check the username field now has focus
ST.textField('textfield[name="user"]')
.focused();
});
});