From: David De Bono on 22 Jul 2010 03:53 Hi! Why we need Unicode; for example when the user has a russian/chinese/japanese keyboard. If you go in regional settings and add for example a russian keyboard layout you will get russian characters when typing on your keyboard. Have not looked so much into ToUnicode yet, but in order to use that I first need a the virtual keycode for the key pressed. The keydown event does not work because it only returns a 8 bit code. David "Karl E. Peterson" <karl(a)exmvps.org> skrev i nyhetsmeldingen: i288r3$ran$1(a)news.eternal-september.org ... > 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 > >
From: Henning on 22 Jul 2010 06:01 bottomposting <again> "David De Bono" <er_fortsatt(a)hotmail.com> skrev i meddelandet news:OZNyzLXKLHA.4216(a)TK2MSFTNGP06.phx.gbl... > Hi! > > Why we need Unicode; for example when the user has a > russian/chinese/japanese keyboard. > > If you go in regional settings and add for example a russian keyboard > layout you will get russian characters when typing on your keyboard. > > Have not looked so much into ToUnicode yet, but in order to use that I > first need a the virtual keycode for the key pressed. > > The keydown event does not work because it only returns a 8 bit code. > > David > > "Karl E. Peterson" <karl(a)exmvps.org> skrev i nyhetsmeldingen: > i288r3$ran$1(a)news.eternal-september.org ... >> 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 >> >> AFAIK there is no language specific keyboard, except for keytop labels. It only delivers RAW keycodes. The keyboard driver and the selected code page is what is different. /Henning
From: Cor on 22 Jul 2010 06:15 > AFAIK there is no language specific keyboard, except for keytop labels. It > only delivers RAW keycodes. The keyboard driver and the selected code page > is what is different. > http://en.wikipedia.org/wiki/QWERTZ
From: Henning on 22 Jul 2010 07:02 "Cor" <Notmyfirstname(a)planet.nl> skrev i meddelandet news:O%23%23%23GbYKLHA.5716(a)TK2MSFTNGP05.phx.gbl... > >> AFAIK there is no language specific keyboard, except for keytop labels. >> It >> only delivers RAW keycodes. The keyboard driver and the selected code >> page is what is different. >> > > http://en.wikipedia.org/wiki/QWERTZ I'm not sure if this is ment to correct me or amplify what I said? I take it for ampifying "except keytop labels". /Henning
From: Karl E. Peterson on 22 Jul 2010 15:15 David De Bono used his keyboard to write : > Have not looked so much into ToUnicode yet, but in order to use that I first > need a the virtual keycode for the key pressed. > > The keydown event does not work because it only returns a 8 bit code. But it provides a trigger for a call to GetKeyboardState? Of course, you could simply subclass the window(s) you're interested in, and monitor input directly. -- ..NET: It's About Trust! http://vfred.mvps.org
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: DWord Alignment Issue? Next: Icon on WindowList menu using MDIChild Form icon. |