@@ -31,6 +31,8 @@ public class Settings : BaseModel, IHotkeySettings
31
31
public string SelectPrevPageHotkey { get ; set ; } = $ "PageDown";
32
32
public string OpenContextMenuHotkey { get ; set ; } = $ "Ctrl+O";
33
33
public string SettingWindowHotkey { get ; set ; } = $ "Ctrl+I";
34
+ public string CycleHistoryUpHotkey { get ; set ; } = $ "{ KeyConstant . Alt } + Up";
35
+ public string CycleHistoryDownHotkey { get ; set ; } = $ "{ KeyConstant . Alt } + Down";
34
36
35
37
public string Language
36
38
{
@@ -280,42 +282,9 @@ public List<RegisteredHotkeyData> RegisteredHotkeys
280
282
{
281
283
get
282
284
{
283
- var list = new List < RegisteredHotkeyData >
284
- {
285
- new ( "Up" , "HotkeyLeftRightDesc" ) ,
286
- new ( "Down" , "HotkeyLeftRightDesc" ) ,
287
- new ( "Left" , "HotkeyUpDownDesc" ) ,
288
- new ( "Right" , "HotkeyUpDownDesc" ) ,
289
- new ( "Escape" , "HotkeyESCDesc" ) ,
290
- new ( "F5" , "ReloadPluginHotkey" ) ,
291
- new ( "Alt+Home" , "HotkeySelectFirstResult" ) ,
292
- new ( "Alt+End" , "HotkeySelectLastResult" ) ,
293
- new ( "Ctrl+R" , "HotkeyRequery" ) ,
294
- new ( "Ctrl+H" , "ToggleHistoryHotkey" ) ,
295
- new ( "Ctrl+OemCloseBrackets" , "QuickWidthHotkey" ) ,
296
- new ( "Ctrl+OemOpenBrackets" , "QuickWidthHotkey" ) ,
297
- new ( "Ctrl+OemPlus" , "QuickHeightHotkey" ) ,
298
- new ( "Ctrl+OemMinus" , "QuickHeightHotkey" ) ,
299
- new ( "Ctrl+Shift+Enter" , "HotkeyCtrlShiftEnterDesc" ) ,
300
- new ( "Shift+Enter" , "OpenContextMenuHotkey" ) ,
301
- new ( "Enter" , "HotkeyRunDesc" ) ,
302
- new ( "Ctrl+Enter" , "OpenContainFolderHotkey" ) ,
303
- new ( "Alt+Enter" , "HotkeyOpenResult" ) ,
304
- new ( "Ctrl+F12" , "ToggleGameModeHotkey" ) ,
305
- new ( "Ctrl+Shift+C" , "CopyFilePathHotkey" ) ,
306
-
307
- new ( $ "{ OpenResultModifiers } +D1", "HotkeyOpenResultN" , 1 ) ,
308
- new ( $ "{ OpenResultModifiers } +D2", "HotkeyOpenResultN" , 2 ) ,
309
- new ( $ "{ OpenResultModifiers } +D3", "HotkeyOpenResultN" , 3 ) ,
310
- new ( $ "{ OpenResultModifiers } +D4", "HotkeyOpenResultN" , 4 ) ,
311
- new ( $ "{ OpenResultModifiers } +D5", "HotkeyOpenResultN" , 5 ) ,
312
- new ( $ "{ OpenResultModifiers } +D6", "HotkeyOpenResultN" , 6 ) ,
313
- new ( $ "{ OpenResultModifiers } +D7", "HotkeyOpenResultN" , 7 ) ,
314
- new ( $ "{ OpenResultModifiers } +D8", "HotkeyOpenResultN" , 8 ) ,
315
- new ( $ "{ OpenResultModifiers } +D9", "HotkeyOpenResultN" , 9 ) ,
316
- new ( $ "{ OpenResultModifiers } +D0", "HotkeyOpenResultN" , 10 )
317
- } ;
285
+ var list = FixedHotkeys ( ) ;
318
286
287
+ // Customizeable hotkeys
319
288
if ( ! string . IsNullOrEmpty ( Hotkey ) )
320
289
list . Add ( new ( Hotkey , "flowlauncherHotkey" , ( ) => Hotkey = "" ) ) ;
321
290
if ( ! string . IsNullOrEmpty ( PreviewHotkey ) )
@@ -340,7 +309,12 @@ public List<RegisteredHotkeyData> RegisteredHotkeys
340
309
list . Add ( new ( SelectNextPageHotkey , "SelectNextPageHotkey" , ( ) => SelectNextPageHotkey = "" ) ) ;
341
310
if ( ! string . IsNullOrEmpty ( SelectPrevPageHotkey ) )
342
311
list . Add ( new ( SelectPrevPageHotkey , "SelectPrevPageHotkey" , ( ) => SelectPrevPageHotkey = "" ) ) ;
312
+ if ( ! string . IsNullOrEmpty ( CycleHistoryUpHotkey ) )
313
+ list . Add ( new ( CycleHistoryUpHotkey , "CycleHistoryUpHotkey" , ( ) => CycleHistoryUpHotkey = "" ) ) ;
314
+ if ( ! string . IsNullOrEmpty ( CycleHistoryDownHotkey ) )
315
+ list . Add ( new ( CycleHistoryDownHotkey , "CycleHistoryDownHotkey" , ( ) => CycleHistoryDownHotkey = "" ) ) ;
343
316
317
+ // Custom Query Hotkeys
344
318
foreach ( var customPluginHotkey in CustomPluginHotkeys )
345
319
{
346
320
if ( ! string . IsNullOrEmpty ( customPluginHotkey . Hotkey ) )
@@ -350,6 +324,45 @@ public List<RegisteredHotkeyData> RegisteredHotkeys
350
324
return list ;
351
325
}
352
326
}
327
+
328
+ private List < RegisteredHotkeyData > FixedHotkeys ( )
329
+ {
330
+ return new List < RegisteredHotkeyData >
331
+ {
332
+ new ( "Up" , "HotkeyLeftRightDesc" ) ,
333
+ new ( "Down" , "HotkeyLeftRightDesc" ) ,
334
+ new ( "Left" , "HotkeyUpDownDesc" ) ,
335
+ new ( "Right" , "HotkeyUpDownDesc" ) ,
336
+ new ( "Escape" , "HotkeyESCDesc" ) ,
337
+ new ( "F5" , "ReloadPluginHotkey" ) ,
338
+ new ( "Alt+Home" , "HotkeySelectFirstResult" ) ,
339
+ new ( "Alt+End" , "HotkeySelectLastResult" ) ,
340
+ new ( "Ctrl+R" , "HotkeyRequery" ) ,
341
+ new ( "Ctrl+H" , "ToggleHistoryHotkey" ) ,
342
+ new ( "Ctrl+OemCloseBrackets" , "QuickWidthHotkey" ) ,
343
+ new ( "Ctrl+OemOpenBrackets" , "QuickWidthHotkey" ) ,
344
+ new ( "Ctrl+OemPlus" , "QuickHeightHotkey" ) ,
345
+ new ( "Ctrl+OemMinus" , "QuickHeightHotkey" ) ,
346
+ new ( "Ctrl+Shift+Enter" , "HotkeyCtrlShiftEnterDesc" ) ,
347
+ new ( "Shift+Enter" , "OpenContextMenuHotkey" ) ,
348
+ new ( "Enter" , "HotkeyRunDesc" ) ,
349
+ new ( "Ctrl+Enter" , "OpenContainFolderHotkey" ) ,
350
+ new ( "Alt+Enter" , "HotkeyOpenResult" ) ,
351
+ new ( "Ctrl+F12" , "ToggleGameModeHotkey" ) ,
352
+ new ( "Ctrl+Shift+C" , "CopyFilePathHotkey" ) ,
353
+
354
+ new ( $ "{ OpenResultModifiers } +D1", "HotkeyOpenResultN" , 1 ) ,
355
+ new ( $ "{ OpenResultModifiers } +D2", "HotkeyOpenResultN" , 2 ) ,
356
+ new ( $ "{ OpenResultModifiers } +D3", "HotkeyOpenResultN" , 3 ) ,
357
+ new ( $ "{ OpenResultModifiers } +D4", "HotkeyOpenResultN" , 4 ) ,
358
+ new ( $ "{ OpenResultModifiers } +D5", "HotkeyOpenResultN" , 5 ) ,
359
+ new ( $ "{ OpenResultModifiers } +D6", "HotkeyOpenResultN" , 6 ) ,
360
+ new ( $ "{ OpenResultModifiers } +D7", "HotkeyOpenResultN" , 7 ) ,
361
+ new ( $ "{ OpenResultModifiers } +D8", "HotkeyOpenResultN" , 8 ) ,
362
+ new ( $ "{ OpenResultModifiers } +D9", "HotkeyOpenResultN" , 9 ) ,
363
+ new ( $ "{ OpenResultModifiers } +D0", "HotkeyOpenResultN" , 10 )
364
+ } ;
365
+ }
353
366
}
354
367
355
368
public enum LastQueryMode
0 commit comments