Sadly, I don't speak .NET either, in any meaningful sense. I started with KeysConverter yesterday, but couldn't find any way of getting it to do anything sensible (MSDN has no example code, either) and eventually moved onto the nastiness quoted above.
How many keycodes are there? Could you roll your own reverse lookup just by looping over them all calling ToString() and stuffing it in a dictionary? Not very satisfactory, but then by the sounds of it neither is MSDN's suggestion.
Well, the line quoted above works fine, as far as I can tell, so rolling my own seems a bit peverse. I'm not sure exactly how many keycodes there are (let's assume at least as many as there are keys on the keyboard).
There are also Issues, because some codes are defined to be mapped to different things - the "," key comes up with the name "OemComma" because I believe some keyboards use that keycode for something else, so I don't know it'd be a trivial task to get something which worked on every keyboard (rather than just on mine).
Apart from not compiling, you mean? ;-p If something has become private in the new version of the assembly, will it run on systems which have been updated?
Fair enough about the multiple mappings, though: if both "," and "OemComma" map to the same keycode, then there is no such thing as the reverse mapping I propose.
I'm assuming that the installtion of the update failed somehow, since rolling back and re-applying the update fixed the compilation issues, implying that the privacy of all classes concerned hadn't actually changed.
Comments 11
Reply
Reply
In which case I shall just blink in confusion and wish you good luck.
Reply
Reply
Reply
There are also Issues, because some codes are defined to be mapped to different things - the "," key comes up with the name "OemComma" because I believe some keyboards use that keycode for something else, so I don't know it'd be a trivial task to get something which worked on every keyboard (rather than just on mine).
Reply
Apart from not compiling, you mean? ;-p If something has become private in the new version of the assembly, will it run on systems which have been updated?
Fair enough about the multiple mappings, though: if both "," and "OemComma" map to the same keycode, then there is no such thing as the reverse mapping I propose.
Reply
I'm assuming that the installtion of the update failed somehow, since rolling back and re-applying the update fixed the compilation issues, implying that the privacy of all classes concerned hadn't actually changed.
Reply
Leave a comment