Added class Keys #286

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

Steji commented Nov 14, 2012

The key code enum which can be found in System.Windows.Forms.dll

Add class Keys
Key code enum which can be found in System.Windows.Forms.dll
Owner

nikhilk commented Nov 15, 2012

Basic question: do the values match what you'd expect from HTML DOM key events across browsers/platforms? In other words compat with WinForms is less important, but compat with the DOM is essential. I see a bunch of values like Oem* and MediaPlayPause etc. that suggests former rather than latter.

These should be marked with [ScriptConstants] ... in other words, the enum doesn't exist in script, and generated script should simply have numeric values. Secondly, they don't belong in mscorlib which is relevant to all scripting environments (eg. nodejs). They likely belong in Script.Web.dll.

If you could address those, I think having the ability to reference constants rather than literal numbers would certainly be useful. Thanks.

Steji commented Nov 15, 2012

The values should match the javascript event.which property values. Of all the ones I have tested the values match correctly, the extra ones I left in for completeness but I can remove them if you would prefer?

Thanks for the advice Nikhilk, I'm new to this!

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