aboutsummaryrefslogtreecommitdiffstats
path: root/support/hololens/ServoApp/BrowserPage.cpp
diff options
context:
space:
mode:
authorPaul Rouget <me@paulrouget.com>2020-06-19 08:04:18 +0200
committerPaul Rouget <me@paulrouget.com>2020-06-19 08:07:41 +0200
commitc722b5fdca6d6552dec9debcbc55212066286e1c (patch)
treeba7d2f430dc96648e3ae6a08cdac2242c83acc5d /support/hololens/ServoApp/BrowserPage.cpp
parent9de955f2cc15ee546af8e9e025933e373bf42f93 (diff)
downloadservo-c722b5fdca6d6552dec9debcbc55212066286e1c.tar.gz
servo-c722b5fdca6d6552dec9debcbc55212066286e1c.zip
UWP: Add console input
Diffstat (limited to 'support/hololens/ServoApp/BrowserPage.cpp')
-rw-r--r--support/hololens/ServoApp/BrowserPage.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/support/hololens/ServoApp/BrowserPage.cpp b/support/hololens/ServoApp/BrowserPage.cpp
index 136490bab63..e4f460d3497 100644
--- a/support/hololens/ServoApp/BrowserPage.cpp
+++ b/support/hololens/ServoApp/BrowserPage.cpp
@@ -335,6 +335,15 @@ void BrowserPage::OnDevtoolsButtonClicked(IInspectable const &,
}
}
+void BrowserPage::OnJSInputEdited(IInspectable const &,
+ Input::KeyRoutedEventArgs const &e) {
+ if (e.Key() == Windows::System::VirtualKey::Enter) {
+ auto input = JSInput().Text();
+ JSInput().Text(L"");
+ mDevtoolsClient->Evaluate(input);
+ }
+}
+
void BrowserPage::OnURLEdited(IInspectable const &,
Input::KeyRoutedEventArgs const &e) {
if (e.Key() == Windows::System::VirtualKey::Enter) {