Subj : Re: CTRL key To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Mon Jul 19 2004 02:27 pm mike wrote: >> For Ctrl-X ........ >> nVirtKey = 0x18 >> lKeyData = 0x2d0001 >> >> For Ctrl-A...... >> nVirtKey = 0x1 >> lKeyData = 0x1e0001 >> >> For Ctrl-S...... >> nVirtKey = 0x13 >> lKeyData = 0x1f0001 > >Thanks Bob! One last question, for the different keys, do you know if there >are constants defined? i was hoping so, but didn't know where they would be. >this way the code would look much cleaner when i compare wParam and lParam. >otherwise i guess i could comment it and compare it with the hex value.... Didn't find any VK_ values for control codes, but they are: Letter & 0x1f so Ctrl-A == 'A' & 0x1f == 1 Ctrl-C == 'C' & 0x1f == 3 Ctrl-J == 'J' & 0x1f == 9 == '\t' Ctrl-K == 'K' & 0x1f == 10 == '\n' Ctrl-M == 'M' & 0x1f == 13 == '\r' .