Shailendra
Shailendra

Reputation: 11

angular ui-keydown is not working with shift+ctrl+alt+A keys

For example:

<div ui-keydown="'shift-ctrl-alt-65': 'ctrl.scrollFromShortcut($event,\'others\')'"></div>

shift-ctrl-65 is working correctly. But shift-ctrl-alt-65 is not working with ui-keydown. Please help

Upvotes: 0

Views: 256

Answers (1)

Szabolcs D&#233;zsi
Szabolcs D&#233;zsi

Reputation: 8843

So as it turned out you were missing the enclosing { ... } curly braces.

The ui-keydown directive expects an object literal where the property name is the key combination and the value is an expression that will be evaluated against the scope.

So the solution is:

<div ui-keydown="{'shift-ctrl-alt-65': 'ctrl.scrollFromShortcut($event,\'others\')'}"></div>

Upvotes: 0

Related Questions