Skip to content

Commit

Permalink
Change ShowTouchKeyboard to be KeyboardStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Dec 10, 2022
1 parent 77f36bb commit 70492ac
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
14 changes: 10 additions & 4 deletions SteamController/Profiles/DefaultGuideShortcutsProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,16 @@ private void SteamShortcuts(Context c)

if (c.Steam.BtnX.Pressed())
{
if (Settings.Default.ShowTouchKeyboard)
OnScreenKeyboard.Toggle();
else
c.Keyboard.KeyPress(new VirtualKeyCode[] { VirtualKeyCode.LCONTROL, VirtualKeyCode.LWIN }, VirtualKeyCode.VK_O);
switch (Settings.Default.KeyboardStyle)
{
case Settings.KeyboardStyles.CTRL_WIN_O:
c.Keyboard.KeyPress(new VirtualKeyCode[] { VirtualKeyCode.LCONTROL, VirtualKeyCode.LWIN }, VirtualKeyCode.VK_O);
break;

case Settings.KeyboardStyles.WindowsTouch:
OnScreenKeyboard.Toggle();
break;
}
}

if (c.Steam.BtnL1.Pressed())
Expand Down
13 changes: 10 additions & 3 deletions SteamController/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,19 @@ public SteamControllerConfigsMode SteamControllerConfigs
set { Set("SteamControllerConfigs", value); }
}

public enum KeyboardStyles
{
DoNotShow,
WindowsTouch,
CTRL_WIN_O
}

[Browsable(true)]
[Description("Show Touch Keyboard or CTRL+WIN+O")]
public bool ShowTouchKeyboard
public KeyboardStyles KeyboardStyle
{
get { return Get<bool>("ShowTouchKeyboard", true); }
set { Set("ShowTouchKeyboard", value); }
get { return Get<KeyboardStyles>("KeyboardStyle", KeyboardStyles.WindowsTouch); }
set { Set("KeyboardStyle", value); }
}

public override string ToString()
Expand Down

0 comments on commit 70492ac

Please sign in to comment.