Files
osu-framework/osu.Framework/Platform/Linux/LinuxReadableKeyCombinationProvider.cs
Dan Balasescu 7ee5f6f4d5 Renamespace classes to SDL3
Using `using SDL.SDL3` to fix namespace conflicts.
2024-05-21 16:51:02 +09:00

42 lines
1.1 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Input.Bindings;
using osu.Framework.Platform.SDL3;
using SDL;
namespace osu.Framework.Platform.Linux
{
public class LinuxReadableKeyCombinationProvider : SDL3ReadableKeyCombinationProvider
{
protected override string GetReadableKey(InputKey key)
{
switch (key)
{
case InputKey.Super:
return "Super";
default:
return base.GetReadableKey(key);
}
}
protected override bool TryGetNameFromKeycode(SDL_Keycode keycode, out string name)
{
switch (keycode)
{
case SDL_Keycode.SDLK_LGUI:
name = "LSuper";
return true;
case SDL_Keycode.SDLK_RGUI:
name = "RSuper";
return true;
default:
return base.TryGetNameFromKeycode(keycode, out name);
}
}
}
}