1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . Diagnostics ;
3
4
using System . Linq ;
4
5
using System . Windows . Forms ;
5
6
using CommunityToolkit . Mvvm . Input ;
10
11
using Flow . Launcher . Infrastructure . UserSettings ;
11
12
using Flow . Launcher . Plugin ;
12
13
using Flow . Launcher . Plugin . SharedModels ;
14
+ using Microsoft . Win32 ;
15
+ using OpenFileDialog = System . Windows . Forms . OpenFileDialog ;
13
16
14
17
namespace Flow . Launcher . SettingPages . ViewModels ;
15
18
@@ -25,6 +28,7 @@ public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortabl
25
28
_updater = updater ;
26
29
_portable = portable ;
27
30
UpdateEnumDropdownLocalizations ( ) ;
31
+ IsLegacyKoreanIMEEnabled ( ) ;
28
32
}
29
33
30
34
public class SearchWindowScreenData : DropdownDataGeneric < SearchWindowScreens > { }
@@ -187,6 +191,48 @@ public string Language
187
191
}
188
192
}
189
193
194
+ bool IsLegacyKoreanIMEEnabled ( )
195
+ {
196
+ const string subKeyPath = @"Software\Microsoft\input\tsf\tsf3override\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}" ;
197
+ const string valueName = "NoTsf3Override5" ;
198
+
199
+ try
200
+ {
201
+ using ( RegistryKey key = Registry . CurrentUser . OpenSubKey ( subKeyPath ) )
202
+ {
203
+ if ( key != null )
204
+ {
205
+ object value = key . GetValue ( valueName ) ;
206
+ if ( value != null )
207
+ {
208
+ Debug . WriteLine ( $ "[IME DEBUG] '{ valueName } ' 값: { value } (타입: { value . GetType ( ) } )") ;
209
+
210
+ if ( value is int intValue )
211
+ return intValue == 1 ;
212
+
213
+ if ( int . TryParse ( value . ToString ( ) , out int parsed ) )
214
+ return parsed == 1 ;
215
+ }
216
+ else
217
+ {
218
+ Debug . WriteLine ( $ "[IME DEBUG] '{ valueName } ' 값이 존재하지 않습니다.") ;
219
+ }
220
+ }
221
+ else
222
+ {
223
+ Debug . WriteLine ( $ "[IME DEBUG] 레지스트리 키를 찾을 수 없습니다: { subKeyPath } ") ;
224
+ }
225
+ }
226
+ }
227
+ catch ( Exception ex )
228
+ {
229
+ Debug . WriteLine ( $ "[IME DEBUG] 예외 발생: { ex . Message } ") ;
230
+ }
231
+
232
+ return false ; // 기본적으로 새 IME 사용 중으로 간주
233
+ }
234
+
235
+
190
236
public bool ShouldUsePinyin
191
237
{
192
238
get => Settings . ShouldUsePinyin ;
0 commit comments