Leave a comment

Comments 11

bateleur June 10 2010, 13:11:47 UTC
I don't speak .Net so this might be complete bobbins, but should you in fact be using KeysConverter for this?

Reply

venta June 10 2010, 13:21:10 UTC
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.

Reply

bateleur June 10 2010, 13:22:38 UTC
Oh, OK.

In which case I shall just blink in confusion and wish you good luck.

Reply

venta June 10 2010, 13:24:05 UTC
I'm approaching from the update-rollback direction for now, since I haven't managed any productive work yet today!

Reply


onebyone June 11 2010, 11:46:48 UTC
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.

Reply

venta June 11 2010, 13:04:04 UTC
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).

Reply

onebyone June 11 2010, 15:07:55 UTC
"works fine, as far as I can tell"

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

venta June 11 2010, 15:12:01 UTC
Apart from not compiling, you mean?

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

Up