From: David De Bono on 21 Jul 2010 08:01 Hi! In our application we need to read the unicode keypresses as we support multiple languages. The Form keypress event does not return unicode keycodes. Is there any way of reading the last pressed key ? For example using API ? Then we could put this code in the For Keypress event, and find the correct unicode keycode. We using this to output the correct unicode letters using 3rd party controls. David
From: Karl E. Peterson on 21 Jul 2010 12:40 David De Bono submitted this idea : > Hi! > > In our application we need to read the unicode keypresses as we support > multiple languages. > > The Form keypress event does not return unicode keycodes. > > Is there any way of reading the last pressed key ? For example using API ? I've just started fiddling around with the RawInput API. If you only support XP+, that might be an option. http://msdn.microsoft.com/en-us/library/ms645536(v=VS.85).aspx So far, I've got the mouse stuff working pretty well, but haven't fiddled with the keyboard yet. That said, I am *totally* unfamiliar with any keyboards that offer Unicode keys. Where the heck might someone find something like that? Actually, now that I say that, I remember there's a ToUnicode function that will take a virtual keycode and keyboard state, and translate that to a Unicode character. http://msdn.microsoft.com/en-us/library/ms646320%28VS.85%29.aspx If RawInput is too overwhelming, you could probably test the keyboard state whenever you get a KeyDown event? -- ..NET: It's About Trust! http://vfred.mvps.org
From: Bob Riemersma on 21 Jul 2010 20:54 "Karl E. Peterson" <karl(a)exmvps.org> wrote in message news:i277tr$t25$1(a)news.eternal-september.org... > David De Bono submitted this idea : >> Hi! >> >> In our application we need to read the unicode keypresses as we support >> multiple languages. >> >> The Form keypress event does not return unicode keycodes. >> >> Is there any way of reading the last pressed key ? For example using API >> ? > > I've just started fiddling around with the RawInput API. If you only > support XP+, that might be an option. > > http://msdn.microsoft.com/en-us/library/ms645536(v=VS.85).aspx > > So far, I've got the mouse stuff working pretty well, but haven't fiddled > with the keyboard yet. That said, I am *totally* unfamiliar with any > keyboards that offer Unicode keys. Where the heck might someone find > something like that? > > Actually, now that I say that, I remember there's a ToUnicode function > that will take a virtual keycode and keyboard state, and translate that to > a Unicode character. > > http://msdn.microsoft.com/en-us/library/ms646320%28VS.85%29.aspx > > If RawInput is too overwhelming, you could probably test the keyboard > state whenever you get a KeyDown event? > I didn't think any keyboards do Unicode input as such. Don't they use multi-key entry via one of the IMEs? http://blogs.msdn.com/b/wit/archive/2009/01/14/introduction-to-east-asian-writing-systems-and-imes.aspx
From: Karl E. Peterson on 21 Jul 2010 22:01 Bob Riemersma explained : > "Karl E. Peterson" <karl(a)exmvps.org> wrote in message > news:i277tr$t25$1(a)news.eternal-september.org... >> David De Bono submitted this idea : >>> Hi! >>> >>> In our application we need to read the unicode keypresses as we support >>> multiple languages. >>> >>> The Form keypress event does not return unicode keycodes. >>> >>> Is there any way of reading the last pressed key ? For example using API ? >> >> I've just started fiddling around with the RawInput API. If you only >> support XP+, that might be an option. >> >> http://msdn.microsoft.com/en-us/library/ms645536(v=VS.85).aspx >> >> So far, I've got the mouse stuff working pretty well, but haven't fiddled >> with the keyboard yet. That said, I am *totally* unfamiliar with any >> keyboards that offer Unicode keys. Where the heck might someone find >> something like that? >> >> Actually, now that I say that, I remember there's a ToUnicode function that >> will take a virtual keycode and keyboard state, and translate that to a >> Unicode character. >> >> http://msdn.microsoft.com/en-us/library/ms646320%28VS.85%29.aspx >> >> If RawInput is too overwhelming, you could probably test the keyboard state >> whenever you get a KeyDown event? >> > > I didn't think any keyboards do Unicode input as such. Don't they use > multi-key entry via one of the IMEs? > > http://blogs.msdn.com/b/wit/archive/2009/01/14/introduction-to-east-asian-writing-systems-and-imes.aspx I honestly have no idea. I'm just another ignorant 'mercan on that count. :-/ -- ..NET: It's About Trust! http://vfred.mvps.org
From: Karl E. Peterson on 21 Jul 2010 22:02 Karl E. Peterson explained : > Bob Riemersma explained : >> "Karl E. Peterson" <karl(a)exmvps.org> wrote in message >> news:i277tr$t25$1(a)news.eternal-september.org... >>> David De Bono submitted this idea : >>>> Hi! >>>> >>>> In our application we need to read the unicode keypresses as we support >>>> multiple languages. >>>> >>>> The Form keypress event does not return unicode keycodes. >>>> >>>> Is there any way of reading the last pressed key ? For example using API >>>> ? >>> >>> I've just started fiddling around with the RawInput API. If you only >>> support XP+, that might be an option. >>> >>> http://msdn.microsoft.com/en-us/library/ms645536(v=VS.85).aspx >>> >>> So far, I've got the mouse stuff working pretty well, but haven't fiddled >>> with the keyboard yet. That said, I am *totally* unfamiliar with any >>> keyboards that offer Unicode keys. Where the heck might someone find >>> something like that? >>> >>> Actually, now that I say that, I remember there's a ToUnicode function >>> that will take a virtual keycode and keyboard state, and translate that to >>> a Unicode character. >>> >>> http://msdn.microsoft.com/en-us/library/ms646320%28VS.85%29.aspx >>> >>> If RawInput is too overwhelming, you could probably test the keyboard >>> state whenever you get a KeyDown event? >>> >> >> I didn't think any keyboards do Unicode input as such. Don't they use >> multi-key entry via one of the IMEs? >> >> http://blogs.msdn.com/b/wit/archive/2009/01/14/introduction-to-east-asian-writing-systems-and-imes.aspx > > I honestly have no idea. I'm just another ignorant 'mercan on that count. > :-/ But regardless, that ToUnicode function certainly implies their use can be interpreted in that way, no? -- ..NET: It's About Trust! http://vfred.mvps.org
|
Next
|
Last
Pages: 1 2 3 4 Prev: DWord Alignment Issue? Next: Icon on WindowList menu using MDIChild Form icon. |