Skip to content

Commit 0ed52a2

Browse files
committed
- change string vs to sn (sticky notes)
- Add ClearFocus When Set hotkey - Add get focus when click window
1 parent f3c0c33 commit 0ed52a2

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

Flow.Launcher/HotkeyControl.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
7878
}
7979
tbMsg.Visibility = Visibility.Visible;
8080
OnHotkeyChanged();
81+
Keyboard.ClearFocus();
8182
}
8283
}
8384

Flow.Launcher/Languages/en.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
<system:String x:Key="RecommendShellDesc">Shell Command</system:String>
266266
<system:String x:Key="RecommendBluetooth">Bluetooth</system:String>
267267
<system:String x:Key="RecommendBluetoothDesc">Bluetooth in Windows Setting</system:String>
268-
<system:String x:Key="RecommendAcronyms">vs</system:String>
269-
<system:String x:Key="RecommendAcronymsDesc">Visual Studio</system:String>
268+
<system:String x:Key="RecommendAcronyms">sn</system:String>
269+
<system:String x:Key="RecommendAcronymsDesc">Sticky Notes</system:String>
270270

271271
</ResourceDictionary>

Flow.Launcher/Languages/ko.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@
258258
<system:String x:Key="HotkeyCtrlIDesc">설정창 열기</system:String>
259259
<system:String x:Key="HotkeyF5Desc">플러그인 데이터 새로고침</system:String>
260260

261-
<system:String x:Key="RecommendWeather">g 날씨</system:String>
261+
<system:String x:Key="RecommendWeather">날씨</system:String>
262262
<system:String x:Key="RecommendWeatherDesc">구글 날씨 검색</system:String>
263263
<system:String x:Key="RecommendShell">&gt; ping 8.8.8.8</system:String>
264264
<system:String x:Key="RecommendShellDesc">쉘 명령어</system:String>
265265
<system:String x:Key="RecommendBluetooth">블루투스</system:String>
266266
<system:String x:Key="RecommendBluetoothDesc">윈도우 블루투스 설정</system:String>
267-
<system:String x:Key="RecommendAcronyms">vs</system:String>
268-
<system:String x:Key="RecommendAcronymsDesc">Visual Studio</system:String>
267+
<system:String x:Key="RecommendAcronyms">스메</system:String>
268+
<system:String x:Key="RecommendAcronymsDesc">스티커 메모</system:String>
269269

270270
</ResourceDictionary>

Flow.Launcher/WelcomeWindow.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
xmlns:ui="http://schemas.modernwpf.com/2019"
99
Name="FlowWelcomeWindow"
1010
Title="Welcome to Flow Launcher"
11+
Activated="OnActivated"
1112
Width="550"
1213
Height="650"
14+
MouseDown="window_MouseDown"
1315
Background="{DynamicResource Color00B}"
1416
Foreground="{DynamicResource PopupTextColor}"
1517
WindowStartupLocation="CenterScreen"

Flow.Launcher/WelcomeWindow.xaml.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using System;
22
using System.Windows;
3+
using System.Windows.Input;
4+
using System.Windows.Controls;
35
using Flow.Launcher.Infrastructure.UserSettings;
46
using Flow.Launcher.Resources.Pages;
57
using ModernWpf.Media.Animation;
@@ -90,5 +92,19 @@ private static Type PageTypeSelector(int pageNumber)
9092
_ => throw new ArgumentOutOfRangeException(nameof(pageNumber), pageNumber, "Unexpected Page Number")
9193
};
9294
}
95+
96+
private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
97+
{
98+
if (Keyboard.FocusedElement is not TextBox textBox)
99+
{
100+
return;
101+
}
102+
var tRequest = new TraversalRequest(FocusNavigationDirection.Next);
103+
textBox.MoveFocus(tRequest);
104+
}
105+
private void OnActivated(object sender, EventArgs e)
106+
{
107+
Keyboard.ClearFocus();
108+
}
93109
}
94110
}

0 commit comments

Comments
 (0)