Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

make behaviour in input, select, and textarea configurable. #33

Merged
merged 3 commits into from Mar 21, 2012

Conversation

Projects
None yet
2 participants
Contributor

dominictarr commented Mar 5, 2012

I've moved the test for INPUT, SELECT and TEXTAREA into a property of key,
key.prekeydown

if the function assigned to prekeydown returns false, then keymaster ignores the key press.

you can also change scope in this function, so you can have a scope the shortcuts that work inside an input.

one quirk is that keys in the 'all' scope still work when you've changed the scope.
so, if you want shortcuts that do not apply inside an input, you need to assign them to a particular scope.

madrobby added a commit that referenced this pull request Mar 21, 2012

Merge pull request #33 from dominictarr/keymaster
---

Ive moved the test for INPUT, SELECT and TEXTAREA into a property of `key`,
`key.prekeydown`

if the function assigned to `prekeydown` returns `false`, then keymaster ignores the key press.

you can also change scope in this function, so you can have a scope the shortcuts that work inside an input.

one quirk is that keys in the all scope still work when youve changed the scope.
so, if you want shortcuts that do not apply inside an input, you need to assign them to a particular scope.

Conflicts:
	keymaster.min.js

@madrobby madrobby merged commit a7c27ef into madrobby:master Mar 21, 2012

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