Upper case keyboard?
-
Tuesday, August 21, 2007 1:38 PM
m_sInKey = Char::ToString((char)e->KeyValue::get());
always returns upper case characters in a keyboard event handler.
Any idea what's wrong?
All Replies
-
Tuesday, August 21, 2007 2:22 PMModerator
I'm not familiar with that handler, but it's possible that it expects you to check the shift / capslock status at the time of the event. Perhaps that's also exposed through the event. -
Tuesday, August 21, 2007 6:05 PM
Thanks,
I changed it to this:
int iKey;
if(e->Shift == true)
iKey = e->KeyValue::get();
else
iKey = e->KeyValue::get() + 32;
m_sInKey = Char::ToString((char)iKey);
That works for alpha keys, but not punctuation, numerals, etc.
I'll have to run a bunch of filters...
-
Tuesday, August 21, 2007 7:24 PM
Is that the KeyEventArgs.KeyValue Property? If so then the sample code there shows that there are many other related properties.

