1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 03:57:25 +08:00

Merge pull request #3 from angelaz1/jmeng1/keyboard_shortcuts

Added ctrl + w and ctrl + t keyboard shortcuts
This commit is contained in:
Angela Zhang 2020-12-12 21:22:12 -06:00 committed by GitHub
commit aaca703483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -96,6 +96,11 @@ namespace osu.Game.Overlays.Chat.Tabs
selectorTab.Active.Value = false; selectorTab.Active.Value = false;
} }
public void SelectChannelSelectorTab()
{
SelectTab(selectorTab);
}
protected override TabFillFlowContainer CreateTabFlow() => new ChannelTabFillFlowContainer protected override TabFillFlowContainer CreateTabFlow() => new ChannelTabFillFlowContainer
{ {
Direction = FillDirection.Full, Direction = FillDirection.Full,

View File

@ -357,6 +357,20 @@ namespace osu.Game.Overlays
} }
} }
if (e.ControlPressed)
{
switch (e.Key)
{
case Key.W:
channelManager.LeaveChannel(channelManager.CurrentChannel.Value);
return true;
case Key.T:
ChannelTabControl.SelectChannelSelectorTab();
return true;
}
}
return base.OnKeyDown(e); return base.OnKeyDown(e);
} }