Comments (6)
We would like to add support for other keyboards through a 4th parameter called localization
where you can give it a key or a whole entire new set and it'll overwrite the others.
Once I get this working would you be up for sending me a new JSON packet with German keys so I could include a separate directory containing other layouts? :)
from jkey.
Of course, gladly. And some other european ones, as well.
from jkey.
Great! I'll try to implement that tomorrow, or maybe sometime this week and ping ya again :)
from jkey.
So, i finally added it in, but I'm not 100% sure about the syntax. It'd look like this:
$(window).jkey('?',callback,{'?':223})
Or, my suggestion would be to use it like:
var localization = {'?':223,'a':224,'b':225,'c':226}
$(window).jkey('?',callback,localization)
$(window).jkey('a+b,c',callback,localization)
Basically, we setup a var with all the new key mappings and then pass with each call you wanna overwrite it with. What do you think? It's working now and if you think it works I can push an update!
from jkey.
Well, one could argue the need of passing in the localization var over and over again, it could be bothering when the locale var is out of scope for instance. I would pass it into the jkey config in some kind of constructor of init method.
Otherwise I think the above is a good idea. Do we have a source to easily find out the key numbers? Is it possible they differ among user agents?
I tried your code as-is without any success.
from jkey.
Ah, you can try out here what your keyboard code js has detected, and this also leeds to a new bug, this time in FF. On http://www.webonweboff.com/tips/js/event_key_codes.aspx#instant-test you can test your input. Safari will give back '189', while FF states '0' as keyboard code. Could also be a bug in those script running on webonweboff, though.
Where can I pull the code that enables me to use the upper syntax you suggested? Is it available already or could you send me a patch?
from jkey.
Related Issues (19)
- Add support to allow event bubbling. HOT 8
- jKey - Double Digit Support HOT 1
- Unbinding jKey events HOT 4
- alert()s and confirms() break jKey if they are invoked with it HOT 3
- '?' shortcut does not work on FF/Mac OS X
- Change the way of traversing of `keySplit` array
- Numeric keyboard HOT 1
- Key Combos Firing when one key is pressed HOT 2
- Demo page not working HOT 4
- selector for '*:not(:input)' bug ? HOT 9
- Command key on OS X prevents keyup (Safari, Chrome, FF)
- Key patterns (like the konami code) HOT 3
- How did you make the skeuomorphic keys in the documentation? HOT 1
- When set the Key combination of alt+s. It show an alert correctly. after i press s key in page it shows as same alert inappropriately HOT 4
- Error when combining with other javascript HOT 8
- command-c triggers "c" HOT 4
- Internet Explorer trouble HOT 8
- Unbind should proceed bind HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jkey.