mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
XAML key bindings
This commit is contained in:
parent
7fb12fcc43
commit
749f2217f9
3 changed files with 33 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "BrowserPage.h"
|
||||
#include "BrowserPage.g.cpp"
|
||||
|
||||
using namespace std::placeholders;
|
||||
using namespace winrt::Windows::Foundation;
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
|
@ -50,6 +51,17 @@ void BrowserPage::BindServoEvents() {
|
|||
});
|
||||
servoControl().OnCaptureGesturesEnded(
|
||||
[=] { navigationBar().IsHitTestVisible(true); });
|
||||
urlTextbox().GotFocus(std::bind(&BrowserPage::OnURLFocused, this, _1));
|
||||
}
|
||||
|
||||
void BrowserPage::OnURLFocused(Windows::Foundation::IInspectable const &) {
|
||||
urlTextbox().SelectAll();
|
||||
}
|
||||
|
||||
void BrowserPage::OnURLKeyboardAccelerator(
|
||||
Windows::Foundation::IInspectable const &,
|
||||
Windows::UI::Xaml::Input::KeyboardAcceleratorInvokedEventArgs const &) {
|
||||
urlTextbox().Focus(FocusState::Programmatic);
|
||||
}
|
||||
|
||||
void BrowserPage::LoadServoURI(Uri uri) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue