How to get right characters?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

How to get right characters?

Postby PuntoRam » Tue Feb 12, 2019 2:52 am

Hey guys,
I tried a few code example to get my pressed keys, but either I get different characters ( I press a but get for example 3) or I get everything in upper case. So right now I do it this way:
Code: Select all
       
private void MainWindow_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (Tag != null)
            {
               var client = Tag as TcpDeviceClient;
               var wpfKey = e.Key == System.Windows.Input.Key.System ? e.SystemKey : e.Key;
               client.SetKey(KeyInterop.VirtualKeyFromKey(wpfKey));
            }
        }


But Im getting everythink in upper case. Is there an better way?
PuntoRam
Newbie
 
Posts: 1
Joined: Tue Feb 12, 2019 2:48 am

Re: How to get right characters?

Postby magreenblatt » Tue Feb 12, 2019 9:52 am

It looks like you’re using a third-party CEF language wrapper. You should ask on a forum appropriate to that wrapper.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 88 guests