Sending keys in Windows 10 IoT

0 votes

So, I developed a capacitive I2C keyboard for a Raspberry Pi 2 with Windows 10 IoT, so when my I2C controller detects a keystroke I need to send a key to the current page.

In windows forms I have used:

SendKeys.Send("{ENTER}");

How can I send keys?

Dec 4, 2018 in IoT (Internet of Things) by Upasana
• 8,550 points
47 views

1 answer to this question.

0 votes

Sorry, but it is not allowed in UWP due to some APIs restriction to be called only by user interaction. 

Instead, you can programmatically write text to the textboxes like:

// To simulate key 'A' and 'B'
Textbox1.Text += 'A';
Textbox1.Text += 'B';

// To simulate backspace if Textbox contains any character
if (Textbox1.Text.Length > 0)
{
    Textbox1.Text = Textbox1.Text.Remove(Textbox1.Text.Length - 1);
}

Problem with this snippet is, you can't simulate special key like ALT, CTRL, F1-F12, Shift and WinKey.

answered Dec 4, 2018 by Shubham
• 13,350 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Access Serial Ports in Windows 10 IoT App

On Windows IoT you have to use Windows.Devices.SerialCommunication namespace ...READ MORE

answered Oct 10, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
83 views
0 votes
1 answer

Display time in a Windows Core IoT app with a clock!

It is possible, but you should understand ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
134 views
0 votes
1 answer

Deploy my Windows 10 IOT core application locally!

Of course, you, can! That is, in ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
172 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

USB Mobile Broadband Modem on Windows 10 IoT

I was looking for a solution too, ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
475 views
0 votes
1 answer

Autostart published Application on Windows 10 IoT

It can be done by making changes ...READ MORE

answered Jul 12, 2018 in IoT (Internet of Things) by DataKing99
• 8,130 points
197 views
0 votes
1 answer

Using Sleep()/Delay() in C# on Windows IoT

You'll be glad to know that C# ...READ MORE

answered Aug 28, 2018 in IoT (Internet of Things) by DataKing99
• 8,130 points
462 views
0 votes
1 answer

Adding Windows 10 IoT Core to a Domain

You could follow this link here to ...READ MORE

answered Mar 6 in IoT (Internet of Things) by Shubham
• 13,350 points
226 views
0 votes
1 answer

disable Windows 10 IoT

All you have to do is stop and ...READ MORE

answered Mar 19 in IoT (Internet of Things) by Shubham
• 13,350 points
63 views