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,620 points
950 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,490 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 ...READ MORE

answered Oct 10, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
2,169 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 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,557 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,130 points
1,114 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,240 points
2,742 views
0 votes
1 answer

Autostart published Application on Windows 10 IoT

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

answered Jul 13, 2018 in IoT (Internet of Things) by DataKing99
• 8,250 points
1,800 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,250 points
2,274 views
0 votes
1 answer

Adding Windows 10 IoT Core to a Domain

Suppose your IP was 10.10.0.1, set-executionpolicy remotesigned import-module ...READ MORE

answered Mar 6, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
2,540 views
0 votes
1 answer

disable Windows 10 IoT

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

answered Mar 19, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
688 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP