Better know a framework #2 moustrap

Awesome plugin just came up in gitter channel

Allows to define keyboard shortcuts in code like this

.plugin('aurelia-mousetrap', config => {
	// Example keymap
	config.set('keymap', {
		"/": "KS_SEARCH",
		"n": "KS_NEW"
	});
})

and use in declarative way in views…

like this

<input type="text" mousetrap-focus="KS_SEARCH">

Awesome

6 Likes

I’ve used it in the past, he also did a good talk on Aurelia on youtube