Scighost / Starward

Game Launcher for miHoYo - 米家游戏启动器
https://starward.scighost.com
MIT License
3.54k stars 165 forks source link

Shortcut Key to Switch Games [Feature] #340

Closed studiobutter closed 1 year ago

studiobutter commented 1 year ago

Summary

Add a feature where pressing CTRL + [Any Number] or CTRL + Tab switch to another game (With Tab being used to Switch in Order and CTRL + Shift + Tab switch in reverse order). And an Area for User to change these mapped keys.

I would suggest one for changing server of that game but I don't have any ideas for that Shortcut.

Solution or Design

Example:

Scighost commented 1 year ago

Great idea, I will try to implement it.

Scighost commented 1 year ago

In my design, there are tow kinds of shortcut keys. Ctrl for switching game and Alt for navigate page. In app, shortcut tips display when pressing Ctrl or Alt key, then press any number key to trigger action.

Showcase (only use keyboard)

https://github.com/Scighost/Starward/assets/61003590/437eec5e-ef88-4016-9613-292058b0d1da

However, there are tow known issues I cannot fix:

Link: Download the latest build to experience the bug

studiobutter commented 1 year ago

I have a theory tho IDK about it. What if there's a layer between the background image and the UI so if you clicked on the background, you will still able to use shortcuts.

And about the

System beeps when using Alt shortcuts

Yeah for me it seems like some other Windows UWP Apps have this issue as well. I did found that one of the UWP app "Twinkle Tray" a UWP app for Controlling Display Brightness doesn't have issues with Alt Shortcuts Beeping Problems in their Menu Settings.

Lightczx commented 1 year ago
  • Shortcut keys are not triggered after clicking background image

Doc 当UIElement具有焦点时按下键盘键时发生。 点击背景图片后MainPage直接失焦了,当然不能触发快捷键

万全的做法还是SubClassing,只要注册过就行

Scighost commented 1 year ago

I made some changes in 0.10.0 Preview 2.

https://github.com/Scighost/Starward/assets/61003590/419f8223-31ee-42ab-bb8a-c00798f2962f