Skip to content
This repository has been archived by the owner on Nov 8, 2017. It is now read-only.

Modified keys not working in a sequence set #13

Open
brihogan opened this issue Jul 8, 2012 · 3 comments
Open

Modified keys not working in a sequence set #13

brihogan opened this issue Jul 8, 2012 · 3 comments

Comments

@brihogan
Copy link
Contributor

brihogan commented Jul 8, 2012

First off, thanks for an awesome library!

I can't seem to get the the sequence functionality working with modified keys (e.g. space,shift+3). Is there a way around this? In other words, I want a user to press the space bar and then the pound key. Ideally it'd be able to do space,#, but space,shift+3 is ok, too.

I've tested space,3 and shift+3 and both work separately (of course), but I can't get space,shift+3 (or the ideal space,#) working.

@keithamus
Copy link
Owner

Thanks for this bug report! I'll definitely get this working for 0.4.

As an aside, it's really difficult to get keys like # working - on my UK British keyboard, # is between ' and the return key, and my Shift+3 key combo gives me £ (UK GBP symbol)

@brihogan
Copy link
Contributor Author

brihogan commented Jul 8, 2012

So, different keyboards will have a different keycode for the # symbol? That's unfortunate. Too bad there isn't an API that would feed us the actual symbol pressed instead of the keycode of the button pressed - but maybe that'd have limitations, too.

@keithamus
Copy link
Owner

There is good and bad news.

The good news is there is a proper API for getting the actual key value and not the key code, in the DOM Level 3 Events Spec. (As you can see it has a comprehensive list of key special values here also

The bad news is that it has yet to be implemented by any browser vendors. Webkit browsers (Chrome/Safari) kinda-sorta implement this with KeyboardEvent.keyIdentifier, but using this style of keyboard detection is really an "all or nothing" situation.

However, as soon as one browser supports KeyboardEvent.key/KeyboardEvent.char, I will be working on supporting it for jwerty (in a branch, which will eventually become fully supported in jwerty when the major vendors all support it)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants